summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Green <andy@warmcat.com>2012-04-12 11:02:06 +0800
committerAndy Green <andy.green@linaro.org>2012-04-12 13:31:12 +0800
commita3147888d6aef9c10505e4ad1effa62930f384dc (patch)
tree3243f382390b5e80ab02b0547ae93afbc7af8219
parenteeeddf030dcd62853de8d2bd56ddf55f49f14f33 (diff)
mingw gettimeofday avoid missing include
Based on work from Radu Sorici <soriciradu@gmail.com> Signed-off-by: Andy Green <andy.green@linaro.org>
-rw-r--r--lib/libwebsockets.h2
-rw-r--r--win32port/win32helpers/gettimeofday.h9
2 files changed, 9 insertions, 2 deletions
diff --git a/lib/libwebsockets.h b/lib/libwebsockets.h
index 87c47c7..77afd84 100644
--- a/lib/libwebsockets.h
+++ b/lib/libwebsockets.h
@@ -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
diff --git a/win32port/win32helpers/gettimeofday.h b/win32port/win32helpers/gettimeofday.h
index fc22308..223ceee 100644
--- a/win32port/win32helpers/gettimeofday.h
+++ b/win32port/win32helpers/gettimeofday.h
@@ -1,7 +1,14 @@
#ifndef _GET_TIME_OF_DAY_H
#define _GET_TIME_OF_DAY_H
+#ifdef __MINGW64__
+#else
+#ifdef __MINGW32__
+#else
#include < time.h >
+#endif
+#endif
+
#include <windows.h> //I've ommited context line.
#if defined(_MSC_VER) || defined(_MSC_EXTENSIONS)
#define DELTA_EPOCH_IN_MICROSECS 11644473600000000Ui64
@@ -18,4 +25,4 @@ struct timezone
int gettimeofday(struct timeval *tv, struct timezone *tz);
-#endif \ No newline at end of file
+#endif