]> 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:01:36 +0000 (01:01 +0200)
* lib/stdlib.in.h (aligned_alloc): Enable the C++ alias warning only on
glibc systems.

ChangeLog
lib/stdlib.in.h

index 9505ba3917d1a8fac60b4f526b599ff09bc710ed..952be447b11a1813543aee6818d85161bf462f0f 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