From 2d57707c2fb5325516709daf864ec0499f0019f2 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Fri, 12 Jan 2024 07:44:59 +0100 Subject: [PATCH] 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. --- ChangeLog | 6 ++++++ lib/stdlib.in.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/ChangeLog b/ChangeLog index 0c8ce5a374..597c4f6f5a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2024-01-12 Bruno Haible + + 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 time: Fix test failure on FreeBSD 12.2/sparc64. diff --git a/lib/stdlib.in.h b/lib/stdlib.in.h index 5f929055e8..b901d175ae 100644 --- a/lib/stdlib.in.h +++ b/lib/stdlib.in.h @@ -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 -- 2.39.5