summaryrefslogtreecommitdiff
path: root/lib/sys_random.in.h
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2022-09-03 02:48:38 +0200
committerBruno Haible <bruno@clisp.org>2022-09-03 02:49:33 +0200
commita7f6a02104248ed30762f560c8b9bc02502f89cb (patch)
tree0ee39c531648d66429b99e32f33976386b233a5a /lib/sys_random.in.h
parent258e46887e7a39dac21c9b454336c2a09d130f85 (diff)
downloadgnulib-a7f6a02104248ed30762f560c8b9bc02502f89cb.tar.gz
getrandom: Fix compilation error in C++ mode on FreeBSD 12.
* lib/sys_random.in.h (getrandom): Enable the C++ alias warning only on glibc ≥ 2.25 systems.
Diffstat (limited to 'lib/sys_random.in.h')
-rw-r--r--lib/sys_random.in.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/sys_random.in.h b/lib/sys_random.in.h
index e730e6139f..c91bcd2cd0 100644
--- a/lib/sys_random.in.h
+++ b/lib/sys_random.in.h
@@ -84,7 +84,9 @@ _GL_FUNCDECL_SYS (getrandom, ssize_t,
_GL_CXXALIAS_SYS (getrandom, ssize_t,
(void *buffer, size_t length, unsigned int flags));
# endif
+# if __GLIBC__ + (__GLIBC_MINOR__ >= 25) > 2
_GL_CXXALIASWARN (getrandom);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef getrandom
# if HAVE_RAW_DECL_GETRANDOM