buildroot/package/bitcoin/0001-src-randomenv.cpp-fix-build-on-uclibc.patch
Fabrice Fontaine b62e8beea8 package/bitcoin: security bump to version 0.20.1
- openssl is not a dependency since version 0.20.0 and
  8983ee3e6d
- boost chrono is not needed since version 0.20.0 and
  bd37f2bc26
- Update hash of COPYING (update in year:
  8dc9aa90c3)
- Update indentation in hash file (two spaces)
- Tag as a security bump as having an up to date bitcoin is important:
  https://patchwork.ozlabs.org/project/buildroot/patch/20200202085526.35742-1-james.hilliard1@gmail.com

https://github.com/bitcoin/bitcoin/blob/master/doc/release-notes/release-notes-0.20.1.md
https://github.com/bitcoin/bitcoin/blob/master/doc/release-notes/release-notes-0.20.0.md
https://github.com/bitcoin/bitcoin/blob/master/doc/release-notes/release-notes-0.19.1.md

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2020-11-10 08:31:40 +01:00

49 lines
1.5 KiB
Diff

From 330cb33985d0ce97c20f4a0f0bbda0fbffe098d4 Mon Sep 17 00:00:00 2001
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Date: Mon, 9 Nov 2020 21:18:40 +0100
Subject: [PATCH] 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>
[Upstream status: https://github.com/bitcoin/bitcoin/pull/20358]
---
src/randomenv.cpp | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/randomenv.cpp b/src/randomenv.cpp
index 07122b7f6..5e07c3db4 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);
--
2.28.0