aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGisle Vanem <gvanem@broadpark.no>2011-04-09 12:56:52 +0000
committerDavid Sommerseth <davids@redhat.com>2011-04-15 10:07:05 +0200
commitd1a24b6fe38e15e02e607a71161b3f3c8a7bbad7 (patch)
tree00f432858d68f116086ca16631a6c28dd5993588
parentAdded man page entry for --management-client (diff)
downloadopenvpn-d1a24b6fe38e15e02e607a71161b3f3c8a7bbad7.tar.xz
Avoid re-defining uint32_t when using mingw compiler
Since MingW for quite a long time (since 3.2 in 2008?) has defined 'uint32_t' etc. in it's <stdint.h>, we need to guard against defining them again. Ideally we should figure out in what version of MingW this happened. But for now: Signed-off-by: Gisle Vanem <gvanem@broadpark.no> Acked-by: David Sommerseth <dazo@users.sourceforge.net> Signed-off-by: David Sommerseth <dazo@users.sourceforge.net> (cherry picked from commit 6a8270c29120473570ec6da4003226f36a4b71eb)
-rw-r--r--win/config.h.in7
1 files changed, 7 insertions, 0 deletions
diff --git a/win/config.h.in b/win/config.h.in
index fb349d0..82344a0 100644
--- a/win/config.h.in
+++ b/win/config.h.in
@@ -26,6 +26,9 @@
* Configuration header for Win32 using the MSVC environment.
*/
+#ifndef OPENVPN_CONFIG_H
+#define OPENVPN_CONFIG_H
+
#include <windows.h>
#include <winsock2.h>
#include "autodefs.h" /* machine generated */
@@ -274,6 +277,7 @@ typedef unsigned long in_addr_t;
/* type to use in place of socklen_t if not defined */
#define socklen_t unsigned int
+#ifndef __MINGW32__
/* 32-bit unsigned type */
#define uint32_t unsigned int
@@ -282,6 +286,7 @@ typedef unsigned long in_addr_t;
/* 8-bit unsigned type */
#define uint8_t unsigned char
+#endif /* __MINGW32__ */
/* Route command */
#define ROUTE_PATH "route"
@@ -314,3 +319,5 @@ typedef int intptr_t;
#define HAVE_CPP_VARARG_MACRO_ISO 1
#endif
#endif
+
+#endif /* OPENVPN_CONFIG_H */