From 010a7e5123a204eecf0a99e86fa35ecdd5767971 Mon Sep 17 00:00:00 2001 From: martell Date: Wed, 22 Jan 2014 18:25:53 +0000 Subject: [PATCH] fix mingw64 builds --- lib/libwebsockets.h | 8 ++++---- win32port/win32helpers/gettimeofday.h | 8 +++++--- win32port/win32helpers/websock-w32.h | 3 ++- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/lib/libwebsockets.h b/lib/libwebsockets.h index 2fd78b18e..525e2c900 100644 --- a/lib/libwebsockets.h +++ b/lib/libwebsockets.h @@ -43,12 +43,12 @@ extern "C" { #define strcasecmp stricmp #define getdtablesize() 30000 -#ifndef __SSIZE_T -#define __SSIZE_T +#ifndef _SSIZE_T_DEFINED +#define _SSIZE_T_DEFINED typedef SSIZE_T ssize_t; -#endif // __SSIZE_T +#endif // _SSIZE_T_DEFINED #define LWS_VISIBLE @@ -1119,4 +1119,4 @@ LWS_VISIBLE LWS_EXTERN struct libwebsocket_extension *libwebsocket_get_internal_ } #endif -#endif +#endif \ No newline at end of file diff --git a/win32port/win32helpers/gettimeofday.h b/win32port/win32helpers/gettimeofday.h index 223ceeed8..3d887b64c 100644 --- a/win32port/win32helpers/gettimeofday.h +++ b/win32port/win32helpers/gettimeofday.h @@ -15,14 +15,16 @@ #else #define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL #endif - + +#ifndef _TIMEZONE_DEFINED struct timezone { int tz_minuteswest; /* minutes W of Greenwich */ int tz_dsttime; /* type of dst correction */ }; - +#endif + int gettimeofday(struct timeval *tv, struct timezone *tz); -#endif +#endif \ No newline at end of file diff --git a/win32port/win32helpers/websock-w32.h b/win32port/win32helpers/websock-w32.h index 978488939..0413b856f 100644 --- a/win32port/win32helpers/websock-w32.h +++ b/win32port/win32helpers/websock-w32.h @@ -51,8 +51,9 @@ typedef struct pollfd { typedef INT (WSAAPI *PFNWSAPOLL)(LPWSAPOLLFD fdarray, ULONG nfds, INT timeout); extern PFNWSAPOLL poll; +#ifndef __MINGW32__ extern INT WSAAPI emulated_poll(LPWSAPOLLFD fdarray, ULONG nfds, INT timeout); - +#endif /* override configure because we are not using Makefiles */ #define LWS_NO_FORK