aboutsummaryrefslogtreecommitdiffstats
path: root/main/cjdns/musl.patch
blob: 53001c9d39a83e59b915765107bf5a3f662f1e51 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
--- a/crypto/random/seed/GetEntropyRandomSeed.c	2017-03-18 16:58:52.044846562 +0100
+++ b/crypto/random/seed/GetEntropyRandomSeed.c	2017-03-18 16:13:30.859893443 +0100
@@ -21,10 +21,10 @@
 #include <errno.h>
 #include <sys/syscall.h>
 
-#define GetEntropyRandomSeed_GLIBC_HAS_IT \
-    (defined(__GNU_LIBRARY__) && defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 25))
-
-#if !defined(__OPENBSD__) && !GetEntropyRandomSeed_GLIBC_HAS_IT
+#if !defined(__OPENBSD__) && \
+    (!defined(__GNU_LIBRARY__) || !defined(__GLIBC__) || \
+    !defined(__GLIBC_MINOR__) || __GLIBC__ < 2 || \
+    (__GLIBC__ == 2 && __GLIBC_MINOR__ < 25))
 static int getentropy(void *buf, size_t buflen)
 {
     int ret;