Skip to content

Commit 1cc5e69

Browse files
committed
Merge #20358: src/randomenv.cpp: fix build on uclibc
330cb33 src/randomenv.cpp: fix build on uclibc (Fabrice Fontaine) Pull request description: Check for HAVE_STRONG_GETAUXVAL or HAVE_WEAK_GETAUXVAL before using getauxval to avoid a build failure on uclibc Signed-off-by: Fabrice Fontaine <[email protected]> ACKs for top commit: laanwj: Code review ACK 330cb33 Tree-SHA512: 94fbbdb0e859f0220d64b2d04565f575b410327f080125fec7fb74205d0bea0e8133561c83a696033d6dc377871133871b72c1aad19aca61e972ce67e0fdf707
2 parents fbb2bee + 330cb33 commit 1cc5e69

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/randomenv.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
#include <sys/vmmeter.h>
5454
#endif
5555
#endif
56-
#ifdef __linux__
56+
#if defined(HAVE_STRONG_GETAUXVAL) || defined(HAVE_WEAK_GETAUXVAL)
5757
#include <sys/auxv.h>
5858
#endif
5959

@@ -326,7 +326,7 @@ void RandAddStaticEnv(CSHA512& hasher)
326326
// Bitcoin client version
327327
hasher << CLIENT_VERSION;
328328

329-
#ifdef __linux__
329+
#if defined(HAVE_STRONG_GETAUXVAL) || defined(HAVE_WEAK_GETAUXVAL)
330330
// Information available through getauxval()
331331
# ifdef AT_HWCAP
332332
hasher << getauxval(AT_HWCAP);
@@ -346,7 +346,7 @@ void RandAddStaticEnv(CSHA512& hasher)
346346
const char* exec_str = (const char*)getauxval(AT_EXECFN);
347347
if (exec_str) hasher.Write((const unsigned char*)exec_str, strlen(exec_str) + 1);
348348
# endif
349-
#endif // __linux__
349+
#endif // HAVE_STRONG_GETAUXVAL || HAVE_WEAK_GETAUXVAL
350350

351351
#ifdef HAVE_GETCPUID
352352
AddAllCPUID(hasher);

0 commit comments

Comments
 (0)