diff options
author | Bruno Haible <bruno@clisp.org> | 2020-05-31 20:12:04 +0200 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2020-05-31 20:18:25 +0200 |
commit | 90b3a5b610c51939aace88f3fd9ebf0d9cc74af3 (patch) | |
tree | c98984df87c1f3749a64ba3e1bf85af75525fa39 /m4/unistd_h.m4 | |
parent | 67306f600fe6a3bcf3fbb6d8bf4b8953b74a8fb7 (diff) | |
download | gnulib-90b3a5b610c51939aace88f3fd9ebf0d9cc74af3.tar.gz |
getentropy: Work around a macOS and Solaris problem.
* lib/unistd.in.h: Include <sys/random.h>, when needed for the
'getentropy' module.
* m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize
UNISTD_H_HAVE_SYS_RANDOM_H.
* m4/sys_random_h.m4 (gl_HEADER_SYS_RANDOM): Set
UNISTD_H_HAVE_SYS_RANDOM_H.
* modules/unistd (Makefile.am): Substitute UNISTD_H_HAVE_SYS_RANDOM_H.
* doc/glibc-functions/getentropy.texi: Document the macOS and Solaris
problem. List more platforms.
Diffstat (limited to 'm4/unistd_h.m4')
-rw-r--r-- | m4/unistd_h.m4 | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/m4/unistd_h.m4 b/m4/unistd_h.m4 index a3b4633f68..dfa38f85d6 100644 --- a/m4/unistd_h.m4 +++ b/m4/unistd_h.m4 @@ -1,4 +1,4 @@ -# unistd_h.m4 serial 79 +# unistd_h.m4 serial 80 dnl Copyright (C) 2006-2020 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -200,6 +200,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS], REPLACE_UNLINKAT=0; AC_SUBST([REPLACE_UNLINKAT]) REPLACE_USLEEP=0; AC_SUBST([REPLACE_USLEEP]) REPLACE_WRITE=0; AC_SUBST([REPLACE_WRITE]) + UNISTD_H_HAVE_SYS_RANDOM_H=0; AC_SUBST([UNISTD_H_HAVE_SYS_RANDOM_H]) UNISTD_H_HAVE_WINSOCK2_H=0; AC_SUBST([UNISTD_H_HAVE_WINSOCK2_H]) UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0; AC_SUBST([UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS]) |