]> granicus.if.org Git - python/commitdiff
add a specific configure check for sys/random.h (closes #28932)
authorBenjamin Peterson <benjamin@python.org>
Tue, 20 Dec 2016 07:54:25 +0000 (23:54 -0800)
committerBenjamin Peterson <benjamin@python.org>
Tue, 20 Dec 2016 07:54:25 +0000 (23:54 -0800)
Misc/NEWS
Python/random.c
configure
configure.ac
pyconfig.h.in

index e203a2d56ff9021e22733f136468b56b500ba5b2..b6474eb33369e6e70b3604cc0ce44148c07e5b7f 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -10,6 +10,8 @@ What's New in Python 2.7.14?
 Core and Builtins
 -----------------
 
+- Issue #28932: Do not include <sys/random.h> if it does not exist.
+
 Library
 -------
 
index 2f83b5d087d5f5c7ee6a3b58dc818ba6025aa941..08b2a998dd67b30f9635ffae2dd9a123aef20299 100644 (file)
@@ -3,7 +3,7 @@
 #include <windows.h>
 #else
 #include <fcntl.h>
-#if defined(HAVE_GETRANDOM) || defined(HAVE_GETENTROPY)
+#ifdef HAVE_SYS_RANDOM_H
 #include <sys/random.h>
 #endif
 #endif
index c01dfe0f27463b64723bb4fd3ddbd275ba37142d..84f1d7ea543a3adf9744110091e73d57d49ce661 100755 (executable)
--- a/configure
+++ b/configure
@@ -7054,7 +7054,7 @@ shadow.h signal.h stdint.h stropts.h termios.h thread.h \
 unistd.h utime.h \
 sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
 sys/lock.h sys/mkdev.h sys/modem.h \
-sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
+sys/param.h sys/poll.h sys/random.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
 sys/termio.h sys/time.h \
 sys/times.h sys/types.h sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
 sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
index 127346502c3b252ae7994204bc080469a6024fcd..85352fa761b38e98f307b87f04d505bff0369a9e 100644 (file)
@@ -1702,7 +1702,7 @@ shadow.h signal.h stdint.h stropts.h termios.h thread.h \
 unistd.h utime.h \
 sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
 sys/lock.h sys/mkdev.h sys/modem.h \
-sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
+sys/param.h sys/poll.h sys/random.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
 sys/termio.h sys/time.h \
 sys/times.h sys/types.h sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
 sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
index 062d4905afcf5b75f6862144074075d1998ad988..98a76a55f443cce1b5baddddb8fa006467d383b1 100644 (file)
 /* Define to 1 if you have the <sys/poll.h> header file. */
 #undef HAVE_SYS_POLL_H
 
+/* Define to 1 if you have the <sys/random.h> header file. */
+#undef HAVE_SYS_RANDOM_H
+
 /* Define to 1 if you have the <sys/resource.h> header file. */
 #undef HAVE_SYS_RESOURCE_H