17 lines
755 B
Diff
17 lines
755 B
Diff
diff -up ./crypto/random/seed/GetEntropyRandomSeed.c.entropy ./crypto/random/seed/GetEntropyRandomSeed.c
|
|
--- ./crypto/random/seed/GetEntropyRandomSeed.c.entropy 2016-10-11 17:39:44.000000000 -0400
|
|
+++ ./crypto/random/seed/GetEntropyRandomSeed.c 2017-02-18 13:59:03.131999629 -0500
|
|
@@ -21,7 +21,11 @@
|
|
#include <errno.h>
|
|
#include <sys/syscall.h>
|
|
|
|
-#ifndef __OPENBSD__
|
|
+#define GetEntropyRandomSeed_GLIBC_HAS_IT \
|
|
+ (defined(__GNU_LIBRARY__) && defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 25))
|
|
+/* gcc warns against using defined() inside #define, so just copy definition */
|
|
+#if !defined(__OPENBSD__) && \
|
|
+!(defined(__GNU_LIBRARY__) && defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 25))
|
|
static int getentropy(void *buf, size_t buflen)
|
|
{
|
|
int ret;
|