From 922ee2c5292ba898ac1ca72c69e877af307b0bc4 Mon Sep 17 00:00:00 2001 From: Martin Willi Date: Fri, 11 Oct 2013 14:45:56 +0200 Subject: windows: Add a common Windows header for platform specific wrappers Include some more basic system headers in utils.h, so we can use that common header on the different platforms. --- src/libstrongswan/utils/utils.h | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'src/libstrongswan/utils/utils.h') diff --git a/src/libstrongswan/utils/utils.h b/src/libstrongswan/utils/utils.h index 392f24e63..ca0d6b9a3 100644 --- a/src/libstrongswan/utils/utils.h +++ b/src/libstrongswan/utils/utils.h @@ -26,9 +26,18 @@ #include #include #include -#include #include +#ifdef WIN32 +# include "windows.h" +#else +# define _GNU_SOURCE +# include +# include +# include +# include +#endif + /** * strongSwan program return codes */ @@ -273,7 +282,7 @@ static inline bool memeq(const void *x, const void *y, size_t len) * TODO: since the uintXX_t types are defined by the C99 standard we should * probably use those anyway */ -#ifdef __sun +#if defined __sun || defined WIN32 #include typedef uint8_t u_int8_t; typedef uint16_t u_int16_t; -- cgit v1.2.3