summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarcel Raad <Marcel.Raad@teamviewer.com>2018-10-07 21:46:56 +0200
committerMarcel Raad <Marcel.Raad@teamviewer.com>2018-10-09 08:33:45 +0200
commit940e1c1e743e376ddd47f2e2bd963c82d8dc5f59 (patch)
tree19cb42ba5a9fbb032255d171ad629f0987405531 /src
parent6450a55721a9c0eda97e83cf014106392d15c1b6 (diff)
downloadcurl-940e1c1e743e376ddd47f2e2bd963c82d8dc5f59.tar.gz
Windows: fixes for MinGW targeting Windows Vista
Classic MinGW has neither InitializeCriticalSectionEx nor GetTickCount64, independent of the target Windows version. Closes https://github.com/curl/curl/pull/3113
Diffstat (limited to 'src')
-rw-r--r--src/tool_util.c3
1 files changed, 2 insertions, 1 deletions
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();