From 2e2a3d7bb6c7a7d6e8f0ccd7282c65308c6226f7 Mon Sep 17 00:00:00 2001 From: Kevin Bowling Date: Tue, 23 Nov 2010 19:09:08 -0700 Subject: [PATCH] Reworked AIX __ss_family workaround to use AC_STRUCT_MEMBER. --- configure.in | 2 +- include/event2/util.h | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/configure.in b/configure.in index 35577976..cc04c8d9 100644 --- a/configure.in +++ b/configure.in @@ -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 #ifdef HAVE_NETINET_IN_H #include diff --git a/include/event2/util.h b/include/event2/util.h index 11807784..ff24a147 100644 --- a/include/event2/util.h +++ b/include/event2/util.h @@ -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. */ -- 2.49.0