mirror of
https://github.com/curl/curl.git
synced 2025-02-23 15:10:03 +08:00
easy_lock: fix build for mingw
- Define SRWLOCK symbols missing in some mingw environments. Closes https://github.com/curl/curl/pull/8997
This commit is contained in:
parent
0defae2fe5
commit
bbffb8c285
@ -28,6 +28,19 @@
|
||||
|
||||
#if defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x600
|
||||
|
||||
#ifdef __MINGW32__
|
||||
#ifndef __MINGW64_VERSION_MAJOR
|
||||
#if (__MINGW32_MAJOR_VERSION < 5) || \
|
||||
(__MINGW32_MAJOR_VERSION == 5 && __MINGW32_MINOR_VERSION == 0)
|
||||
/* mingw >= 5.0.1 defines SRWLOCK, and slightly different from MS define */
|
||||
typedef PVOID SRWLOCK, *PSRWLOCK;
|
||||
#endif
|
||||
#endif
|
||||
#ifndef SRWLOCK_INIT
|
||||
#define SRWLOCK_INIT NULL
|
||||
#endif
|
||||
#endif /* __MINGW32__ */
|
||||
|
||||
#define curl_simple_lock SRWLOCK
|
||||
#define CURL_SIMPLE_LOCK_INIT SRWLOCK_INIT
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user