summaryrefslogtreecommitdiff
path: root/lib/sys_random.in.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sys_random.in.h')
-rw-r--r--lib/sys_random.in.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/sys_random.in.h b/lib/sys_random.in.h
index 1abd6c544..e730e6139 100644
--- a/lib/sys_random.in.h
+++ b/lib/sys_random.in.h
@@ -1,5 +1,5 @@
/* Substitute for <sys/random.h>.
- Copyright (C) 2020-2021 Free Software Foundation, Inc.
+ Copyright (C) 2020-2022 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -23,8 +23,10 @@
#if @HAVE_SYS_RANDOM_H@
-/* On uClibc, <sys/random.h> assumes prior inclusion of <stddef.h>. */
-# if defined __UCLIBC__
+/* On uClibc < 1.0.35, <sys/random.h> assumes prior inclusion of <stddef.h>.
+ Do not use __UCLIBC__ here, as it might not be defined yet.
+ But avoid namespace pollution on glibc systems. */
+# ifndef __GLIBC__
# include <stddef.h>
# endif
/* On Mac OS X 10.5, <sys/random.h> assumes prior inclusion of <sys/types.h>.