]> 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:47:42 +0000 (09:47 +0100)
* lib/stdlib.in.h (qsort_r): Enable the C++ alias warning only on glibc
systems.

ChangeLog
lib/stdlib.in.h

index e87670e874713525c3167f6b670a8e05ce4d1df8..60c338356b3e39c6ffb1b556d55059a8c2aecee8 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 b9838c7d5ee9c8754e979d5f4711bd5481f1513d..272464e0fcc75bfc353195ff6677cfb5e84dcf4d 100644 (file)
@@ -1,6 +1,6 @@
 /* A GNU-like <stdlib.h>.
 
-   Copyright (C) 1995, 2001-2004, 2006-2023 Free Software Foundation, Inc.
+   Copyright (C) 1995, 2001-2004, 2006-2024 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
@@ -1104,7 +1104,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