make sure sa_family_t is defined

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.hund@sophos.com>
Acked-by: Arne Schwabe <arne@rfc2549.org>
Message-Id: <1389972638-8006-1-git-send-email-heiko.hund@sophos.com>
URL: http://article.gmane.org/gmane.network.openvpn.devel/8242
Signed-off-by: Gert Doering <gert@greenie.muc.de>
This commit is contained in:
Heiko Hund 2014-01-17 16:30:37 +01:00 committed by Gert Doering
parent 615fb9ef36
commit 87b468d428
2 changed files with 13 additions and 0 deletions

View File

@ -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],
,

View File

@ -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
*/