mirror of
https://github.com/monero-project/monero.git
synced 2024-12-23 03:59:33 +00:00
FreeBSD alloca.h reference fixed
This commit is contained in:
parent
4ba680f294
commit
6afbdd9754
2 changed files with 12 additions and 2 deletions
|
@ -28,7 +28,6 @@
|
||||||
//
|
//
|
||||||
// Parts of this file are originally copyright (c) 2012-2013 The Cryptonote developers
|
// Parts of this file are originally copyright (c) 2012-2013 The Cryptonote developers
|
||||||
|
|
||||||
#include <alloca.h>
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
@ -42,6 +41,12 @@
|
||||||
#include "crypto.h"
|
#include "crypto.h"
|
||||||
#include "hash.h"
|
#include "hash.h"
|
||||||
|
|
||||||
|
#ifndef __FreeBSD__
|
||||||
|
#include <alloca.h>
|
||||||
|
#else
|
||||||
|
#include <stdlib.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace crypto {
|
namespace crypto {
|
||||||
|
|
||||||
using std::abort;
|
using std::abort;
|
||||||
|
|
|
@ -28,13 +28,18 @@
|
||||||
//
|
//
|
||||||
// Parts of this file are originally copyright (c) 2012-2013 The Cryptonote developers
|
// Parts of this file are originally copyright (c) 2012-2013 The Cryptonote developers
|
||||||
|
|
||||||
#include <alloca.h>
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "hash-ops.h"
|
#include "hash-ops.h"
|
||||||
|
|
||||||
|
#ifndef __FreeBSD__
|
||||||
|
#include <alloca.h>
|
||||||
|
#else
|
||||||
|
#include <stdlib.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
/// Quick check if this is power of two (use on unsigned types; in this case for size_t only)
|
/// Quick check if this is power of two (use on unsigned types; in this case for size_t only)
|
||||||
bool ispowerof2_size_t(size_t x) {
|
bool ispowerof2_size_t(size_t x) {
|
||||||
return x && !(x & (x - 1));
|
return x && !(x & (x - 1));
|
||||||
|
|
Loading…
Reference in a new issue