Reworked AIX __ss_family workaround to use AC_STRUCT_MEMBER.

This commit is contained in:
Kevin Bowling 2010-11-23 19:09:08 -07:00 committed by Nick Mathewson
parent a3a9f6b2d9
commit 2e2a3d7bb6
2 changed files with 8 additions and 1 deletions

View File

@ -470,7 +470,7 @@ AC_CHECK_TYPES([struct in6_addr, struct sockaddr_in6, sa_family_t, struct addrin
#endif
#endif
])
AC_CHECK_MEMBERS([struct in6_addr.s6_addr32, struct in6_addr.s6_addr16, struct sockaddr_in.sin_len, struct sockaddr_in6.sin6_len], , ,
AC_CHECK_MEMBERS([struct in6_addr.s6_addr32, struct in6_addr.s6_addr16, struct sockaddr_in.sin_len, struct sockaddr_in6.sin6_len, struct sockaddr_storage.ss_family, struct sockaddr_storage.__ss_family], , ,
[#include <sys/types.h>
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>

View File

@ -207,6 +207,13 @@ extern "C" {
#define ev_socklen_t socklen_t
#endif
#ifdef _EVENT_HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY
#if !defined(_EVENT_HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY) \
&& !defined(ss_family)
#define ss_family __ss_family
#endif
#endif
#ifdef WIN32
/** A type wide enough to hold the output of "socket()" or "accept()". On
* Windows, this is an intptr_t; elsewhere, it is an int. */