0003-sys_random-port-better-to-uClibc-1-0-35.patch 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. From 135414a7f543e4d40ad0a7cbd51885e159a6e0f4 Mon Sep 17 00:00:00 2001
  2. From: Paul Eggert <eggert@cs.ucla.edu>
  3. Date: Tue, 30 Nov 2021 17:50:01 -0800
  4. Subject: sys_random: port better to uClibc < 1.0.35
  5. Problem reported by Fabrice Fontaine in:
  6. https://lists.gnu.org/r/bug-gnulib/2021-11/msg00043.html
  7. * lib/sys_random.in.h [HAVE_SYS_RANDOM_H && !__GLIBC__ && __UCLIBC__]:
  8. Include <stddef.h>, in case this file is included before
  9. __UCLIBC__ is defined.
  10. [Retrieved (and backported to remove ChangeLog update) from:
  11. https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=135414a7f543e4d40ad0a7cbd51885e159a6e0f4]
  12. Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  13. ---
  14. ChangeLog | 9 +++++++++
  15. lib/sys_random.in.h | 6 ++++--
  16. 2 files changed, 13 insertions(+), 2 deletions(-)
  17. diff --git a/lib/sys_random.in.h b/lib/sys_random.in.h
  18. index 1abd6c544..8b4b934a1 100644
  19. --- a/lib/sys_random.in.h
  20. +++ b/lib/sys_random.in.h
  21. @@ -23,8 +23,10 @@
  22. #if @HAVE_SYS_RANDOM_H@
  23. -/* On uClibc, <sys/random.h> assumes prior inclusion of <stddef.h>. */
  24. -# if defined __UCLIBC__
  25. +/* On uClibc < 1.0.35, <sys/random.h> assumes prior inclusion of <stddef.h>.
  26. + Do not use __UCLIBC__ here, as it might not be defined yet.
  27. + But avoid namespace pollution on glibc systems. */
  28. +# ifndef __GLIBC__
  29. # include <stddef.h>
  30. # endif
  31. /* On Mac OS X 10.5, <sys/random.h> assumes prior inclusion of <sys/types.h>.
  32. --
  33. cgit v1.2.1