changeset: 105762:32cc37a89b58 branch: 2.7 parent: 105758:46e329ef13ae user: Benjamin Peterson date: Mon Dec 19 23:54:25 2016 -0800 files: Misc/NEWS Python/random.c configure configure.ac pyconfig.h.in description: add a specific configure check for sys/random.h (closes #28932) diff -r 46e329ef13ae -r 32cc37a89b58 Misc/NEWS --- a/Misc/NEWS Tue Dec 20 16:07:18 2016 +0900 +++ b/Misc/NEWS Mon Dec 19 23:54:25 2016 -0800 @@ -10,6 +10,8 @@ Core and Builtins ----------------- +- Issue #28932: Do not include if it does not exist. + Library ------- diff -r 46e329ef13ae -r 32cc37a89b58 Python/random.c --- a/Python/random.c Tue Dec 20 16:07:18 2016 +0900 +++ b/Python/random.c Mon Dec 19 23:54:25 2016 -0800 @@ -3,7 +3,7 @@ #include #else #include -#if defined(HAVE_GETRANDOM) || defined(HAVE_GETENTROPY) +#ifdef HAVE_SYS_RANDOM_H #include #endif #endif diff -r 46e329ef13ae -r 32cc37a89b58 configure --- a/configure Tue Dec 20 16:07:18 2016 +0900 +++ b/configure Mon Dec 19 23:54:25 2016 -0800 @@ -7054,7 +7054,7 @@ 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 -r 46e329ef13ae -r 32cc37a89b58 configure.ac --- a/configure.ac Tue Dec 20 16:07:18 2016 +0900 +++ b/configure.ac Mon Dec 19 23:54:25 2016 -0800 @@ -1702,7 +1702,7 @@ 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 -r 46e329ef13ae -r 32cc37a89b58 pyconfig.h.in --- a/pyconfig.h.in Tue Dec 20 16:07:18 2016 +0900 +++ b/pyconfig.h.in Mon Dec 19 23:54:25 2016 -0800 @@ -781,6 +781,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_POLL_H +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_RANDOM_H + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_RESOURCE_H