]> 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 09:45:41 +0000 (11:45 +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 a99e79d970c09c8fbaef4a857026120505cd3ba6..26590c9cc7b689285e88d239bd3319f2ba51e69e 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 afeedf070c60227f8823a91fc4e0d637832c4285..62211e475c0848a3ed0b603310caede73aabba29 100644 (file)
@@ -358,7 +358,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
@@ -420,7 +422,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
@@ -452,7 +456,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
@@ -599,7 +605,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