From 4c61ba40b9fccb197aae4e6443d564a5e2a501a6 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Tue, 12 Aug 2014 13:03:56 +0200 Subject: build: check for sys/prctl.h in the proper way Use AC_CHECK_HEADERS to check for the header, and include it only if detected and the subsequent HAVE_SYS_PRCTL_H is set. --- src/util.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/util.cpp') diff --git a/src/util.cpp b/src/util.cpp index 93fefbac8..ae2145a3a 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" @@ -24,7 +28,6 @@ #endif #define _POSIX_C_SOURCE 200112L -#include #endif // __linux__ @@ -61,6 +64,10 @@ #include #endif +#ifdef HAVE_SYS_PRCTL_H +#include +#endif + #include // for to_lower() #include #include // for startswith() and endswith() -- cgit v1.2.3