]> Savannah Git Hosting - gnulib.git/commitdiff
getrandom: Fix compilation error in C++ mode on FreeBSD 12.
authorBruno Haible <bruno@clisp.org>
Sat, 3 Sep 2022 00:48:38 +0000 (02:48 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 4 Sep 2022 00:08:31 +0000 (02:08 +0200)
* lib/sys_random.in.h (getrandom): Enable the C++ alias warning only on
glibc ≥ 2.25 systems.

ChangeLog
lib/sys_random.in.h

index 3b4a0611d460b075557053981e15658b27acf0c9..14ad58968f3b04014f6aff2f21826ae4f2d609d3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2022-09-02  Bruno Haible  <bruno@clisp.org>
+
+       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.
+
 2022-09-02  Bruno Haible  <bruno@clisp.org>
 
        math C++ tests: Fix compilation error with clang on FreeBSD 13.
index e730e6139f8775af0296409858ba02dd27c43d54..c91bcd2cd04a4610b5938811dfd2fab80e283c7e 100644 (file)
@@ -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