]> Savannah Git Hosting - gnulib.git/commitdiff
sys_socket: Fix compilation errors in C++ mode on AIX 7.3 with gcc.
authorBruno Haible <bruno@clisp.org>
Fri, 18 Aug 2023 15:25:26 +0000 (17:25 +0200)
committerBruno Haible <bruno@clisp.org>
Wed, 30 Aug 2023 10:08:54 +0000 (12:08 +0200)
* lib/sys_socket.in.h (accept, getpeername, getsockname, recvfrom):
Disable _GL_CXXALIASWARN invocation on non-glibc systems.

ChangeLog
lib/sys_socket.in.h

index 4971d9667422e7ee05fa0735d1927dd5d9b866c1..21d6ded9421e204769523adb6693dd0f5baf36cd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2023-08-18  Bruno Haible  <bruno@clisp.org>
+
+       sys_socket: Fix compilation errors in C++ mode on AIX 7.3 with gcc.
+       * lib/sys_socket.in.h (accept, getpeername, getsockname, recvfrom):
+       Disable _GL_CXXALIASWARN invocation on non-glibc systems.
+
 2023-08-18  Bruno Haible  <bruno@clisp.org>
 
        stddef: Don't unnecessarily override max_align_t on AIX 7.3 with gcc.
index 6705593f4ab8b3f642fb72c2733352add28c22c6..859a9bb66bb84993296abcd86e32d2e333c76161 100644 (file)
@@ -355,7 +355,9 @@ _GL_CXXALIAS_SYS_CAST (accept, int,
                         struct sockaddr *restrict addr,
                         socklen_t *restrict addrlen));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (accept);
+# endif
 #elif @HAVE_WINSOCK2_H@
 # undef accept
 # define accept accept_used_without_requesting_gnulib_module_accept
@@ -417,7 +419,9 @@ _GL_CXXALIAS_SYS_CAST (getpeername, int,
                        (int fd, struct sockaddr *restrict addr,
                         socklen_t *restrict addrlen));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (getpeername);
+# endif
 #elif @HAVE_WINSOCK2_H@
 # undef getpeername
 # define getpeername getpeername_used_without_requesting_gnulib_module_getpeername
@@ -449,7 +453,9 @@ _GL_CXXALIAS_SYS_CAST (getsockname, int,
                        (int fd, struct sockaddr *restrict addr,
                         socklen_t *restrict addrlen));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (getsockname);
+# endif
 #elif @HAVE_WINSOCK2_H@
 # undef getsockname
 # define getsockname getsockname_used_without_requesting_gnulib_module_getsockname
@@ -596,7 +602,9 @@ _GL_CXXALIAS_SYS_CAST (recvfrom, ssize_t,
                         struct sockaddr *restrict from,
                         socklen_t *restrict fromlen));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (recvfrom);
+# endif
 #elif @HAVE_WINSOCK2_H@
 # undef recvfrom
 # define recvfrom recvfrom_used_without_requesting_gnulib_module_recvfrom