On Windows there's no sa_family_t. This patch defines it in syshead.h is configure did not find it in the system headers.
Signed-off-by: Heiko Hund <heiko.h...@sophos.com> --- configure.ac | 6 ++++++ src/openvpn/syshead.h | 7 +++++++ 2 files changed, 13 insertions(+), 0 deletions(-) diff --git a/configure.ac b/configure.ac index 636d4e2..65dbc25 100644 --- a/configure.ac +++ b/configure.ac @@ -501,6 +501,12 @@ AC_CHECK_TYPE( [[${SOCKET_INCLUDES}]] ) AC_CHECK_TYPE( + [sa_family_t], + [AC_DEFINE([HAVE_SA_FAMILY_T], [1], [struct in_pktinfo needed for IP_PKTINFO support])], + , + [[${SOCKET_INCLUDES}]] +) +AC_CHECK_TYPE( [struct sockaddr_in6], , [AC_MSG_ERROR([struct sockaddr_in6 not found, needed for ipv6 transport support.])], diff --git a/src/openvpn/syshead.h b/src/openvpn/syshead.h index ab6fa01..4050d54 100644 --- a/src/openvpn/syshead.h +++ b/src/openvpn/syshead.h @@ -426,6 +426,13 @@ #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 */ #if 0 -- 1.7.9