From f941b50c6bad30c699a4bb0955e9c5aad77ef527 Mon Sep 17 00:00:00 2001 From: Tim Stahlhut Date: Fri, 2 Aug 2019 17:44:21 -0400 Subject: [PATCH] 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 --- include/wx/private/socket.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/wx/private/socket.h b/include/wx/private/socket.h index 56a3cef528..fe3d3b2df0 100644 --- a/include/wx/private/socket.h +++ b/include/wx/private/socket.h @@ -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;