]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
define IN6_ARE_ADDR_EQUAL macro for WIN32
authorHeiko Hund <heiko.hund@sophos.com>
Wed, 31 Aug 2011 14:49:22 +0000 (14:49 +0000)
committerDavid Sommerseth <davids@redhat.com>
Wed, 31 Aug 2011 17:45:28 +0000 (19:45 +0200)
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>
win32.h

diff --git a/win32.h b/win32.h
index 528af6caa15637b5c8b4fb69a7a65285e3e31a69..5b18e3ce06c4d69bfe236b219e00b9576917438c 100644 (file)
--- a/win32.h
+++ b/win32.h
  * 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);