summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2016-12-20 07:54:57 (GMT)
committerBenjamin Peterson <benjamin@python.org>2016-12-20 07:54:57 (GMT)
commitb0eb986eb236c41ebf098233940e038c7b993b9f (patch)
treefb52bf832962d592652034d5e35cfd160b3418ea
parent7f5954d1f0f0c3b893d85069d27c21ac12b97e46 (diff)
parentfb2ae15c6704a072afeef4786749d9bb2ce7d68d (diff)
downloadcpython-b0eb986eb236c41ebf098233940e038c7b993b9f.zip
cpython-b0eb986eb236c41ebf098233940e038c7b993b9f.tar.gz
cpython-b0eb986eb236c41ebf098233940e038c7b993b9f.tar.bz2
merge 3.5 (#28932)
-rw-r--r--Misc/NEWS2
-rw-r--r--Python/random.c2
-rwxr-xr-xconfigure2
-rw-r--r--configure.ac2
-rw-r--r--pyconfig.h.in3
5 files changed, 8 insertions, 3 deletions
diff --git a/Misc/NEWS b/Misc/NEWS
index 8fcdec5..cd1b661 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -10,6 +10,8 @@ What's New in Python 3.6.1 release candidate 1
Core and Builtins
-----------------
+- Issue #28932: Do not include <sys/random.h> if it does not exist.
+
- Issue #25677: Correct the positioning of the syntax error caret for
indented blocks. Based on patch by Michael Layzell.
diff --git a/Python/random.c b/Python/random.c
index 46e3bb5..f9d600f 100644
--- a/Python/random.c
+++ b/Python/random.c
@@ -12,7 +12,7 @@
# ifdef HAVE_LINUX_RANDOM_H
# include <linux/random.h>
# endif
-# if defined(HAVE_GETRANDOM) || defined(HAVE_GETENTROPY)
+# ifdef HAVE_SYS_RANDOM_H
# include <sys/random.h>
# endif
# if !defined(HAVE_GETRANDOM) && defined(HAVE_GETRANDOM_SYSCALL)
diff --git a/configure b/configure
index 43f342e..fd005f8 100755
--- a/configure
+++ b/configure
@@ -7763,7 +7763,7 @@ unistd.h utime.h \
poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
sys/audioio.h sys/xattr.h sys/bsdtty.h sys/event.h sys/file.h sys/ioctl.h \
sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
-sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
+sys/param.h sys/random.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
sys/times.h sys/types.h sys/uio.h sys/un.h sys/utsname.h sys/wait.h pty.h \
libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
diff --git a/configure.ac b/configure.ac
index af54092..9013c0e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2019,7 +2019,7 @@ unistd.h utime.h \
poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
sys/audioio.h sys/xattr.h sys/bsdtty.h sys/event.h sys/file.h sys/ioctl.h \
sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
-sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
+sys/param.h sys/random.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
sys/times.h sys/types.h sys/uio.h sys/un.h sys/utsname.h sys/wait.h pty.h \
libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
diff --git a/pyconfig.h.in b/pyconfig.h.in
index e7a836c..6b376a6 100644
--- a/pyconfig.h.in
+++ b/pyconfig.h.in
@@ -1033,6 +1033,9 @@
/* 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