mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-07 11:12:50 +01:00
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.
This commit is contained in:
@@ -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 <sys/prctl.h>
|
||||
|
||||
#endif // __linux__
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user