diff options
author | Bruno Haible <bruno@clisp.org> | 2010-11-28 17:04:03 +0100 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2010-11-30 21:17:15 +0100 |
commit | 5500698d4bebe8c204bfeb88673f71240647686a (patch) | |
tree | ada13b1221e691092919b0bcc6716c12b8a2182f /lib/sys_socket.in.h | |
parent | 7c352a7f6327a07a95ca36d80fba5107a0c4265c (diff) | |
download | gnulib-5500698d4bebe8c204bfeb88673f71240647686a.tar.gz |
sys_socket: Ensure ss_family field on AIX.
* lib/sys_socket.in.h (ss_family): New macro definition.
* m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Set
HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY. Set SYS_SOCKET_H if necessary.
(gl_SYS_SOCKET_H_DEFAULTS): Initialize
HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY.
* modules/sys_socket (Makefile.am): Substitute
HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY.
* doc/posix-headers/sys_socket.texi: Mention the AIX bug.
Diffstat (limited to 'lib/sys_socket.in.h')
-rw-r--r-- | lib/sys_socket.in.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/sys_socket.in.h b/lib/sys_socket.in.h index d7a94bf125..21990e992d 100644 --- a/lib/sys_socket.in.h +++ b/lib/sys_socket.in.h @@ -70,7 +70,14 @@ typedef unsigned short sa_family_t; #endif -#if !@HAVE_STRUCT_SOCKADDR_STORAGE@ +#if @HAVE_STRUCT_SOCKADDR_STORAGE@ +/* Make the 'struct sockaddr_storage' field 'ss_family' visible on AIX 7.1. */ +# if !@HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY@ +# ifndef ss_family +# define ss_family __ss_family +# endif +# endif +#else # include <alignof.h> /* Code taken from glibc sysdeps/unix/sysv/linux/bits/socket.h on 2009-05-08, licensed under LGPLv2.1+, plus portability fixes. */ |