You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by yl...@apache.org on 2017/11/04 22:39:23 UTC
svn commit: r1814329 - /apr/apr/trunk/misc/unix/rand.c
Author: ylavic
Date: Sat Nov 4 22:39:22 2017
New Revision: 1814329
URL: http://svn.apache.org/viewvc?rev=1814329&view=rev
Log:
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.
Modified:
apr/apr/trunk/misc/unix/rand.c
Modified: apr/apr/trunk/misc/unix/rand.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/misc/unix/rand.c?rev=1814329&r1=1814328&r2=1814329&view=diff
==============================================================================
--- apr/apr/trunk/misc/unix/rand.c (original)
+++ apr/apr/trunk/misc/unix/rand.c Sat Nov 4 22:39:22 2017
@@ -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