aboutsummaryrefslogtreecommitdiff
path: root/src/randomenv.cpp
diff options
context:
space:
mode:
authorFabrice Fontaine <fontaine.fabrice@gmail.com>2020-11-09 21:18:40 +0100
committerFabrice Fontaine <fontaine.fabrice@gmail.com>2020-11-09 21:21:30 +0100
commit330cb33985d0ce97c20f4a0f0bbda0fbffe098d4 (patch)
tree5b42f746f25a82713ed9b8322d8c5a6445c4ed3a /src/randomenv.cpp
parent1dfe19e2840b16c014674a890ba58a43fe039687 (diff)
src/randomenv.cpp: fix build on uclibc
Check for HAVE_STRONG_GETAUXVAL or HAVE_WEAK_GETAUXVAL before using getauxval to avoid a build failure on uclibc Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Diffstat (limited to 'src/randomenv.cpp')
-rw-r--r--src/randomenv.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/randomenv.cpp b/src/randomenv.cpp
index 07122b7f6d..5e07c3db40 100644
--- a/src/randomenv.cpp
+++ b/src/randomenv.cpp
@@ -53,7 +53,7 @@
#include <sys/vmmeter.h>
#endif
#endif
-#ifdef __linux__
+#if defined(HAVE_STRONG_GETAUXVAL) || defined(HAVE_WEAK_GETAUXVAL)
#include <sys/auxv.h>
#endif
@@ -326,7 +326,7 @@ void RandAddStaticEnv(CSHA512& hasher)
// Bitcoin client version
hasher << CLIENT_VERSION;
-#ifdef __linux__
+#if defined(HAVE_STRONG_GETAUXVAL) || defined(HAVE_WEAK_GETAUXVAL)
// Information available through getauxval()
# ifdef AT_HWCAP
hasher << getauxval(AT_HWCAP);
@@ -346,7 +346,7 @@ void RandAddStaticEnv(CSHA512& hasher)
const char* exec_str = (const char*)getauxval(AT_EXECFN);
if (exec_str) hasher.Write((const unsigned char*)exec_str, strlen(exec_str) + 1);
# endif
-#endif // __linux__
+#endif // HAVE_STRONG_GETAUXVAL || HAVE_WEAK_GETAUXVAL
#ifdef HAVE_GETCPUID
AddAllCPUID(hasher);