From: Bruno Haible Date: Fri, 2 Sep 2022 18:07:03 +0000 (+0200) Subject: aligned_alloc: Fix compilation error in C++ mode on Solaris 11. X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=c4234d38bdcfbad81bb653d07b6717a51f6bea1f;p=gnulib.git aligned_alloc: Fix compilation error in C++ mode on Solaris 11. * lib/stdlib.in.h (aligned_alloc): Enable the C++ alias warning only on glibc systems. --- diff --git a/ChangeLog b/ChangeLog index c898c3d3ef..7896b9d31f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2022-09-02 Bruno Haible + + aligned_alloc: Fix compilation error in C++ mode on Solaris 11. + * lib/stdlib.in.h (aligned_alloc): Enable the C++ alias warning only on + glibc systems. + 2022-09-02 Bruno Haible getdomainname: Fix compilation error in C++ mode on Solaris 11. diff --git a/lib/stdlib.in.h b/lib/stdlib.in.h index a86643c3ca..010875803c 100644 --- a/lib/stdlib.in.h +++ b/lib/stdlib.in.h @@ -226,7 +226,7 @@ _GL_FUNCDECL_SYS (aligned_alloc, void *, _GL_CXXALIAS_SYS (aligned_alloc, void *, (size_t alignment, size_t size)); # endif # endif -# if @HAVE_ALIGNED_ALLOC@ +# if (__GLIBC__ >= 2) && @HAVE_ALIGNED_ALLOC@ _GL_CXXALIASWARN (aligned_alloc); # endif #else