]> granicus.if.org Git - libevent/commitdiff
Reworked AIX __ss_family workaround to use AC_STRUCT_MEMBER.
authorKevin Bowling <kevin.bowling@kev009.com>
Wed, 24 Nov 2010 02:09:08 +0000 (19:09 -0700)
committerNick Mathewson <nickm@torproject.org>
Wed, 24 Nov 2010 03:23:19 +0000 (22:23 -0500)
configure.in
include/event2/util.h

index 3557797603792b12325ce3de39af187d040c0780..cc04c8d95ff735bda43a71ad7c7a6a66527cc111 100644 (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>
index 1180778497c05cb8f1ac1bbd197c273caaf541e8..ff24a1478fbea2479c49227fe13aec0ca33957a9 100644 (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. */