diff --git a/configure.ac b/configure.ac index 636d4e25..380dcdbb 100644 --- a/configure.ac +++ b/configure.ac @@ -500,6 +500,12 @@ AC_CHECK_TYPE( , [[${SOCKET_INCLUDES}]] ) +AC_CHECK_TYPE( + [sa_family_t], + [AC_DEFINE([HAVE_SA_FAMILY_T], [1], [sa_family_t, needed to hold AF_* info])], + , + [[${SOCKET_INCLUDES}]] +) AC_CHECK_TYPE( [struct sockaddr_in6], , diff --git a/src/openvpn/syshead.h b/src/openvpn/syshead.h index ab6fa01f..4050d548 100644 --- a/src/openvpn/syshead.h +++ b/src/openvpn/syshead.h @@ -425,6 +425,13 @@ #define SOL_IP IPPROTO_IP #endif +/* + * Define type sa_family_t if it isn't defined in the socket headers + */ +#ifndef HAVE_SA_FAMILY_T +typedef unsigned short sa_family_t; +#endif + /* * Disable ESEC */