diff options
author | ylavic <ylavic@13f79535-47bb-0310-9956-ffa450edef68> | 2017-11-04 22:39:22 +0000 |
---|---|---|
committer | ylavic <ylavic@13f79535-47bb-0310-9956-ffa450edef68> | 2017-11-04 22:39:22 +0000 |
commit | 7b8971867cd6f63b5751014e725a9c7db40589e2 (patch) | |
tree | 9053e03b9ab0f69112debd21d1b37d57c05ee4da /misc/unix/rand.c | |
parent | b9eb07381350e8b4c591dd2e83e00c5513bb920e (diff) | |
download | libapr-7b8971867cd6f63b5751014e725a9c7db40589e2.tar.gz |
rand: follow up to r1814240 and r1814326.
Thanks Brane, <sys/random.h> may be available w/o getrandom(), and obviously
we must not USE_GETRANDOM in this case.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1814329 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'misc/unix/rand.c')
-rw-r--r-- | misc/unix/rand.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/misc/unix/rand.c b/misc/unix/rand.c index 449819a21..c0f02eca7 100644 --- a/misc/unix/rand.c +++ b/misc/unix/rand.c @@ -43,13 +43,15 @@ #include <sys/uuid.h> #endif -#if defined(HAVE_SYS_RANDOM_H) +#if defined(HAVE_SYS_RANDOM_H) && \ + defined(HAVE_GETRANDOM) #include <sys/random.h> #define USE_GETRANDOM #elif defined(HAVE_SYS_SYSCALL_H) && \ defined(HAVE_LINUX_RANDOM_H) && \ + defined(HAVE_DECL_SYS_GETRANDOM) && \ HAVE_DECL_SYS_GETRANDOM #ifndef _GNU_SOURCE |