From: Bruno Haible Date: Sat, 3 Sep 2022 00:48:38 +0000 (+0200) Subject: getrandom: Fix compilation error in C++ mode on FreeBSD 12. X-Git-Tag: v1.0~2096 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=a7f6a02104248ed30762f560c8b9bc02502f89cb;p=gnulib.git 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. --- diff --git a/ChangeLog b/ChangeLog index 8381ea0430..0cd8962bad 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2022-09-02 Bruno Haible + + 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 math C++ tests: Fix compilation error with clang on FreeBSD 13. 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