diff --git a/include/wx/gsocket.h b/include/wx/gsocket.h index cb34121e17..d674c3e361 100644 --- a/include/wx/gsocket.h +++ b/include/wx/gsocket.h @@ -37,7 +37,13 @@ class WXDLLIMPEXP_FWD_NET wxSocketBase; #include #endif -#include // for timeval +// include the header defining timeval: under Windows this struct is used only +// with sockets so we need to include winsock.h which we do via windows.h +#ifdef __WXMSW__ + #include "wx/msw/wrapwin.h" +#else + #include // for timeval +#endif enum GAddressType {