diff options
Diffstat (limited to 'src/util.cpp')
-rw-r--r-- | src/util.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/util.cpp b/src/util.cpp index d3fa5182f3..ae2145a3a0 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -3,6 +3,10 @@ // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. +#if defined(HAVE_CONFIG_H) +#include "config/bitcoin-config.h" +#endif + #include "util.h" #include "chainparamsbase.h" @@ -17,16 +21,15 @@ #ifndef WIN32 // for posix_fallocate -#ifdef __linux_ +#ifdef __linux__ #ifdef _POSIX_C_SOURCE #undef _POSIX_C_SOURCE #endif #define _POSIX_C_SOURCE 200112L -#include <sys/prctl.h> -#endif +#endif // __linux__ #include <algorithm> #include <fcntl.h> @@ -61,6 +64,10 @@ #include <shlobj.h> #endif +#ifdef HAVE_SYS_PRCTL_H +#include <sys/prctl.h> +#endif + #include <boost/algorithm/string/case_conv.hpp> // for to_lower() #include <boost/algorithm/string/join.hpp> #include <boost/algorithm/string/predicate.hpp> // for startswith() and endswith() |