aboutsummaryrefslogtreecommitdiff
path: root/syshead.h
diff options
context:
space:
mode:
authorDavid Sommerseth <dazo@users.sourceforge.net>2011-04-25 17:08:14 +0200
committerDavid Sommerseth <dazo@users.sourceforge.net>2011-04-25 17:08:14 +0200
commitdcf4bcc2d95faac5d7c4844ca841359526601c69 (patch)
treebb696ead3dadb09234337c2c4e7461a3f7a7ce88 /syshead.h
parentUpdate man page with info about --connect-timeout (diff)
parent* ipv6-0.4.16: fix mingw32 build (diff)
downloadopenvpn-dcf4bcc2d95faac5d7c4844ca841359526601c69.tar.xz
Merge branch 'feat_ipv6_transport'
Diffstat (limited to 'syshead.h')
-rw-r--r--syshead.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/syshead.h b/syshead.h
index 30ff556..9dbb501 100644
--- a/syshead.h
+++ b/syshead.h
@@ -28,6 +28,10 @@
/*
* Only include if not during configure
*/
+#ifdef WIN32
+/* USE_PF_INET6: win32 ipv6 exists only after 0x0501 (XP) */
+#define WINVER 0x0501
+#endif
#ifndef PACKAGE_NAME
#include "config.h"
#endif
@@ -339,6 +343,9 @@
#ifdef WIN32
#include <iphlpapi.h>
#include <wininet.h>
+/* The following two headers are needed of USE_PF_INET6 */
+#include <winsock2.h>
+#include <ws2tcpip.h>
#endif
#ifdef HAVE_SYS_MMAN_H
@@ -383,9 +390,10 @@
#endif
/*
- * Does this platform support linux-style IP_PKTINFO?
+ * Does this platform support linux-style IP_PKTINFO
+ * or bsd-style IP_RECVDSTADDR ?
*/
-#if defined(ENABLE_MULTIHOME) && defined(HAVE_IN_PKTINFO) && defined(IP_PKTINFO) && defined(HAVE_MSGHDR) && defined(HAVE_CMSGHDR) && defined(HAVE_IOVEC) && defined(CMSG_FIRSTHDR) && defined(CMSG_NXTHDR) && defined(HAVE_RECVMSG) && defined(HAVE_SENDMSG)
+#if defined(ENABLE_MULTIHOME) && ((defined(HAVE_IN_PKTINFO)&&defined(IP_PKTINFO)) || defined(IP_RECVDSTADDR)) && defined(HAVE_MSGHDR) && defined(HAVE_CMSGHDR) && defined(HAVE_IOVEC) && defined(CMSG_FIRSTHDR) && defined(CMSG_NXTHDR) && defined(HAVE_RECVMSG) && defined(HAVE_SENDMSG)
#define ENABLE_IP_PKTINFO 1
#else
#define ENABLE_IP_PKTINFO 0