]> Savannah Git Hosting - gnulib.git/commitdiff
aligned_alloc: Fix compilation error in C++ mode on Solaris 11.
authorBruno Haible <bruno@clisp.org>
Fri, 2 Sep 2022 18:07:03 +0000 (20:07 +0200)
committerBruno Haible <bruno@clisp.org>
Fri, 2 Sep 2022 23:03:01 +0000 (01:03 +0200)
* lib/stdlib.in.h (aligned_alloc): Enable the C++ alias warning only on
glibc systems.

ChangeLog
lib/stdlib.in.h

index c898c3d3ef6b44e59935d4844e5014d4dd6e3156..7896b9d31f9caae7953bfa8e29cf1e4f225771cd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2022-09-02  Bruno Haible  <bruno@clisp.org>
+
+       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  <bruno@clisp.org>
 
        getdomainname: Fix compilation error in C++ mode on Solaris 11.
index a86643c3ca35ab7bd98d463dc08bfedb1f0d9841..010875803cc260c6bd04190f1929b1332d75a6e7 100644 (file)
@@ -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