summaryrefslogtreecommitdiffstats
path: root/win32.h
diff options
context:
space:
mode:
authorHeiko Hund <heiko.hund@sophos.com>2011-08-31 14:49:22 +0000
committerDavid Sommerseth <davids@redhat.com>2011-08-31 19:45:28 +0200
commit82167eb2ecfda2ddfbe9899ff7a58b13fac23a60 (patch)
tree99f3d8e79ab3c492c62b77cebd4cb33a926a8f60 /win32.h
parenta18c2b025c851a50bd2df33af5bad99b467da595 (diff)
downloadopenvpn-82167eb2ecfda2ddfbe9899ff7a58b13fac23a60.tar.gz
openvpn-82167eb2ecfda2ddfbe9899ff7a58b13fac23a60.tar.xz
openvpn-82167eb2ecfda2ddfbe9899ff7a58b13fac23a60.zip
define IN6_ARE_ADDR_EQUAL macro for WIN32
Windows headers do not define the IN6_ARE_ADDR_EQUAL macro. It needs to be defined locally when building for WIN32. Signed-off-by: Heiko Hund <heiko.hund@sophos.com> Acked-by: Gert Doering <gert@greenie.muc.de> Signed-off-by: David Sommerseth <davids@redhat.com>
Diffstat (limited to 'win32.h')
-rw-r--r--win32.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/win32.h b/win32.h
index 528af6c..5b18e3c 100644
--- a/win32.h
+++ b/win32.h
@@ -41,6 +41,12 @@
* development environment.
*/
+/* MSVC headers do not define this macro, so do it here */
+#ifndef IN6_ARE_ADDR_EQUAL
+#define IN6_ARE_ADDR_EQUAL(a,b) \
+ (memcmp ((const void*)(a), (const void*)(b), sizeof (struct in6_addr)) == 0)
+#endif
+
void init_win32 (void);
void uninit_win32 (void);