mingw gettimeofday avoid missing include
authorAndy Green <andy@warmcat.com>
Thu, 12 Apr 2012 03:02:06 +0000 (11:02 +0800)
committerAndy Green <andy.green@linaro.org>
Thu, 12 Apr 2012 05:31:12 +0000 (13:31 +0800)
Based on work from Radu Sorici <soriciradu@gmail.com>

Signed-off-by: Andy Green <andy.green@linaro.org>
lib/libwebsockets.h
win32port/win32helpers/gettimeofday.h

index 87c47c7..77afd84 100644 (file)
@@ -35,7 +35,7 @@ extern "C" {
 #include <ws2tcpip.h>
 #include "../win32port/win32helpers/websock-w32.h"
 
-#include "gettimeofday.h"
+#include "../win32port/win32helpers/gettimeofday.h"
 
 #define strcasecmp stricmp
 
index fc22308..223ceee 100644 (file)
@@ -1,7 +1,14 @@
 #ifndef _GET_TIME_OF_DAY_H\r
 #define _GET_TIME_OF_DAY_H\r
 \r
+#ifdef  __MINGW64__\r
+#else\r
+#ifdef  __MINGW32__\r
+#else\r
 #include < time.h >\r
+#endif\r
+#endif\r
+\r
 #include <windows.h> //I've ommited context line.\r
 #if defined(_MSC_VER) || defined(_MSC_EXTENSIONS)\r
   #define DELTA_EPOCH_IN_MICROSECS  11644473600000000Ui64\r
@@ -18,4 +25,4 @@ struct timezone
 int gettimeofday(struct timeval *tv, struct timezone *tz);\r
 \r
 \r
-#endif
\ No newline at end of file
+#endif\r