diff options
author | Benjamin Peterson <benjamin@python.org> | 2016-12-20 07:54:25 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2016-12-20 07:54:25 (GMT) |
commit | fb2ae15c6704a072afeef4786749d9bb2ce7d68d (patch) | |
tree | eb8e9052b3855dd2bfd772114b4728455e56c518 | |
parent | 6165d55f1398ddf1cbd21e237129af7116a1fa73 (diff) | |
download | cpython-fb2ae15c6704a072afeef4786749d9bb2ce7d68d.zip cpython-fb2ae15c6704a072afeef4786749d9bb2ce7d68d.tar.gz cpython-fb2ae15c6704a072afeef4786749d9bb2ce7d68d.tar.bz2 |
add a specific configure check for sys/random.h (closes #28932)
-rw-r--r-- | Misc/NEWS | 2 | ||||
-rw-r--r-- | Python/random.c | 2 | ||||
-rwxr-xr-x | configure | 2 | ||||
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | pyconfig.h.in | 3 |
5 files changed, 8 insertions, 3 deletions
@@ -10,6 +10,8 @@ Release date: TBA Core and Builtins ----------------- +- Issue #28932: Do not include <sys/random.h> if it does not exist. + - Issue #28147: Fix a memory leak in split-table dictionaries: setattr() must not convert combined table into split table. diff --git a/Python/random.c b/Python/random.c index 154f6f9..944ef31 100644 --- a/Python/random.c +++ b/Python/random.c @@ -9,7 +9,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) @@ -7714,7 +7714,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 0886b6e..49d1a37 100644 --- a/configure.ac +++ b/configure.ac @@ -1946,7 +1946,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 bf4ba5b..39ccf53 100644 --- a/pyconfig.h.in +++ b/pyconfig.h.in @@ -1005,6 +1005,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 |