From ce92b301197894b83d26837eec40a07fca542cb5 Mon Sep 17 00:00:00 2001 From: Alug Date: Tue, 6 May 2025 11:53:27 +0100 Subject: [PATCH] fix 32bit windoze compile everything needs time.h idk why it never errored out before lol --- src/i_tcp.c | 49 +++++++++++++++++++++---------------------------- 1 file changed, 21 insertions(+), 28 deletions(-) diff --git a/src/i_tcp.c b/src/i_tcp.c index 191112452..f3d2b9c54 100644 --- a/src/i_tcp.c +++ b/src/i_tcp.c @@ -49,34 +49,28 @@ #ifdef NONET #undef HAVE_MINIUPNPC #else -#ifdef USE_WINSOCK1 -#include -#elif !defined (SCOUW2) && !defined (SCOUW7) && !defined (__OS2__) -#ifndef USE_WINSOCK -#include -#endif //normal BSD API - -#ifndef USE_WINSOCK -#ifdef __APPLE_CC__ -#ifndef _BSD_SOCKLEN_T_ -#define _BSD_SOCKLEN_T_ -#endif //_BSD_SOCKLEN_T_ -#endif //__APPLE_CC__ -#include -#include -#endif //normal BSD API - -#ifndef USE_WINSOCK -#include -#include -#endif //normal BSD API - -#include #include +#ifdef USE_WINSOCK1 + #include +#else + #ifndef USE_WINSOCK + #include + #ifdef __APPLE_CC__ + #ifndef _BSD_SOCKLEN_T_ + #define _BSD_SOCKLEN_T_ + #endif //_BSD_SOCKLEN_T_ + #endif //__APPLE_CC__ + #include + #include + #include + #include + #endif //normal BSD API -#if defined (__unix__) || defined (__APPLE__) || defined (UNIXCOMMON) - #include -#endif // UNIXCOMMON + #include + + #if defined (__unix__) || defined (__APPLE__) || defined (UNIXCOMMON) + #include + #endif // UNIXCOMMON #endif // !NONET #ifdef USE_WINSOCK @@ -123,7 +117,7 @@ #ifndef STATUS_INVALID_PARAMETER #define STATUS_INVALID_PARAMETER 0xC000000D #endif -#endif +#endif // USE_WINSOCK typedef union { @@ -168,7 +162,6 @@ static UINT8 UPNP_support = TRUE; #endif #include "i_addrinfo.h" - #define DEFAULTPORT "5029" #if defined (USE_WINSOCK) && !defined (NONET)