]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
make sure sa_family_t is defined
authorHeiko Hund <heiko.hund@sophos.com>
Fri, 17 Jan 2014 15:30:37 +0000 (16:30 +0100)
committerGert Doering <gert@greenie.muc.de>
Fri, 17 Jan 2014 18:56:50 +0000 (19:56 +0100)
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>
configure.ac
src/openvpn/syshead.h

index 636d4e25d08487abdd3c139c377fbbed70fe7a2f..380dcdbb7ebef898081c59c9b779433d3e92756f 100644 (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],
        ,
index ab6fa01f7e51b16f860c212565478fae90b3262e..4050d548d0954c1506a9afc0de298d15d97951d0 100644 (file)
 #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
  */