summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/curl_threads.h3
-rw-r--r--lib/timeval.c3
-rw-r--r--src/tool_util.c3
-rw-r--r--tests/server/util.c3
4 files changed, 8 insertions, 4 deletions
diff --git a/lib/curl_threads.h b/lib/curl_threads.h
index 9e0d14a30..2a93644c5 100644
--- a/lib/curl_threads.h
+++ b/lib/curl_threads.h
@@ -38,7 +38,8 @@
# define curl_thread_t HANDLE
# define curl_thread_t_null (HANDLE)0
# if !defined(_WIN32_WINNT) || !defined(_WIN32_WINNT_VISTA) || \
- (_WIN32_WINNT < _WIN32_WINNT_VISTA)
+ (_WIN32_WINNT < _WIN32_WINNT_VISTA) || \
+ (defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR))
# define Curl_mutex_init(m) InitializeCriticalSection(m)
# else
# define Curl_mutex_init(m) InitializeCriticalSectionEx(m, 0, 1)
diff --git a/lib/timeval.c b/lib/timeval.c
index bcb571a7c..dce1a761e 100644
--- a/lib/timeval.c
+++ b/lib/timeval.c
@@ -33,7 +33,8 @@ struct curltime Curl_now(void)
*/
struct curltime now;
#if !defined(_WIN32_WINNT) || !defined(_WIN32_WINNT_VISTA) || \
- (_WIN32_WINNT < _WIN32_WINNT_VISTA)
+ (_WIN32_WINNT < _WIN32_WINNT_VISTA) || \
+ (defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR))
DWORD milliseconds = GetTickCount();
now.tv_sec = milliseconds / 1000;
now.tv_usec = (milliseconds % 1000) * 1000;
diff --git a/src/tool_util.c b/src/tool_util.c
index 875411e3b..1a5b773e2 100644
--- a/src/tool_util.c
+++ b/src/tool_util.c
@@ -40,7 +40,8 @@ struct timeval tvnow(void)
** is typically in the range of 10 milliseconds to 16 milliseconds.
*/
struct timeval now;
-#if defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0600)
+#if defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0600) && \
+ (!defined(__MINGW32__) || defined(__MINGW64_VERSION_MAJOR))
ULONGLONG milliseconds = GetTickCount64();
#else
DWORD milliseconds = GetTickCount();
diff --git a/tests/server/util.c b/tests/server/util.c
index df681968d..07ef63ee1 100644
--- a/tests/server/util.c
+++ b/tests/server/util.c
@@ -414,7 +414,8 @@ static struct timeval tvnow(void)
** is typically in the range of 10 milliseconds to 16 milliseconds.
*/
struct timeval now;
-#if defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0600)
+#if defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0600) && \
+ (!defined(__MINGW32__) || defined(__MINGW64_VERSION_MAJOR))
ULONGLONG milliseconds = GetTickCount64();
#else
DWORD milliseconds = GetTickCount();