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 | 6b1c909c08979b5e7fbf7dc4f5b2adcf256ba06d (patch) | |
tree | 0ec4f99cb3b0ac904eb26f45a80396b1b7bcd6f3 | |
parent | e126f98658b2d0713506e4a7bfd437dec5f6ca9d (diff) | |
download | cpython-6b1c909c08979b5e7fbf7dc4f5b2adcf256ba06d.zip cpython-6b1c909c08979b5e7fbf7dc4f5b2adcf256ba06d.tar.gz cpython-6b1c909c08979b5e7fbf7dc4f5b2adcf256ba06d.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 @@ 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 ------- diff --git a/Python/random.c b/Python/random.c index 2f83b5d..08b2a99 100644 --- a/Python/random.c +++ b/Python/random.c @@ -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 @@ -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 \ diff --git a/configure.ac b/configure.ac index 1273465..85352fa 100644 --- a/configure.ac +++ b/configure.ac @@ -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 \ diff --git a/pyconfig.h.in b/pyconfig.h.in index 062d490..98a76a5 100644 --- a/pyconfig.h.in +++ b/pyconfig.h.in @@ -781,6 +781,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 |