+2020-08-13 Bruno Haible <bruno@clisp.org>
+
+ sys_random: Work around an uClibc bug.
+ Reported by akater <nuclearspace@gmail.com>
+ via Stefan Kangas <stefan@marxist.se>
+ in <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=42236>.
+ * lib/sys_random.in.h: On uClibc, include <stddef.h> first.
+ * m4/sys_random_h.m4 (gl_HEADER_SYS_RANDOM): Update comment.
+ * m4/getrandom.m4 (gl_FUNC_GETRANDOM): Likewise.
+ * doc/glibc-headers/sys_random.texi: Mention the uClibc bug.
+
2020-08-12 Bruno Haible <bruno@clisp.org>
Avoid implicit conversion from 'unsigned int' to 'int' in initializers.
glibc 2.24, NetBSD 9.0, OpenBSD 3.8, Minix 3.1.8, AIX 7.1, HP-UX 11.11, IRIX 6.5, Cygwin 2.6.x, mingw, MSVC 14.
@item
This header file is not self-contained on some platforms:
-Mac OS X 10.13.
+uClibc, Mac OS X 10.13.
@end itemize
Portability problems not fixed by Gnulib:
#if @HAVE_SYS_RANDOM_H@
+/* On uClibc, <sys/random.h> assumes prior inclusion of <stddef.h>. */
+# if defined __UCLIBC__
+# include <stddef.h>
+# endif
/* On Mac OS X 10.5, <sys/random.h> assumes prior inclusion of <sys/types.h>.
On Max OS X 10.13, <sys/random.h> assumes prior inclusion of a file that
includes <Availability.h>, such as <stdlib.h> or <unistd.h>. */
-# getrandom.m4 serial 7
+# getrandom.m4 serial 8
dnl Copyright 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,
[gl_cv_func_getrandom_ok],
[AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
- [[/* Additional includes are needed before <sys/random.h> on Mac OS X. */
+ [[/* Additional includes are needed before <sys/random.h> on uClibc
+ and Mac OS X. */
#include <sys/types.h>
#include <stdlib.h>
#include <sys/random.h>
-# sys_random_h.m4 serial 4
+# sys_random_h.m4 serial 5
dnl Copyright (C) 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,
dnl corresponding gnulib module is not in use.
gl_WARN_ON_USE_PREPARE([[
#if HAVE_SYS_RANDOM_H
-/* Additional includes are needed before <sys/random.h> on Mac OS X. */
+/* Additional includes are needed before <sys/random.h> on uClibc
+ and Mac OS X. */
# include <sys/types.h>
# include <stdlib.h>
# include <sys/random.h>