Use cygwin native timeval

__ms_timeval does not exist unless winsock.h or winsock2.h is included.
So, test for __WINDOWS__ before using __ms_timeval.

Fixes #18456
This commit is contained in:
Tim Stahlhut
2019-08-02 17:44:21 -04:00
parent 04cf2038e9
commit f941b50c6b

View File

@@ -65,7 +65,7 @@
// 64 bit Cygwin can't use the standard struct timeval because it has long
// fields, which are supposed to be 32 bits in Win64 API, but long is 64 bits
// in 64 bit Cygwin, so we need to use its special __ms_timeval instead.
#if defined(__CYGWIN__) && defined(__LP64__)
#if defined(__CYGWIN__) && defined(__LP64__) && defined(__WINDOWS__)
typedef __ms_timeval wxTimeVal_t;
#else
typedef timeval wxTimeVal_t;