]> Savannah Git Hosting - gnulib.git/commitdiff
qsort_r: Fix compilation error in C++ mode on FreeBSD 14.0/powerpc64.
authorBruno Haible <bruno@clisp.org>
Fri, 12 Jan 2024 06:44:59 +0000 (07:44 +0100)
committerBruno Haible <bruno@clisp.org>
Thu, 18 Jan 2024 08:31:09 +0000 (09:31 +0100)
* lib/stdlib.in.h (qsort_r): Enable the C++ alias warning only on glibc
systems.

ChangeLog
lib/stdlib.in.h

index d0e17c095019e9d1c0300e888ad339baeb9d2d6e..46efd979fbea8b866a471568b8e7a7951d97e1f9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2024-01-12  Bruno Haible  <bruno@clisp.org>
+
+       qsort_r: Fix compilation error in C++ mode on FreeBSD 14.0/powerpc64.
+       * lib/stdlib.in.h (qsort_r): Enable the C++ alias warning only on glibc
+       systems.
+
 2024-01-11  Bruno Haible  <bruno@clisp.org>
 
        time: Fix test failure on FreeBSD 12.2/sparc64.
index 5f929055e8df1cfb58080436b5015aa472877fee..b901d175aebf33b759951287162b4eea90519832 100644 (file)
@@ -1112,7 +1112,9 @@ _GL_CXXALIAS_SYS (qsort_r, void, (void *base, size_t nmemb, size_t size,
                                   _gl_qsort_r_compar_fn compare,
                                   void *arg));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (qsort_r);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef qsort_r
 # if HAVE_RAW_DECL_QSORT_R