From aabd702dbdbba5af116f37c401f6a17f0ac714ca Mon Sep 17 00:00:00 2001 From: Antony Riakiotakis Date: Tue, 6 Sep 2011 11:17:29 +0000 Subject: fix link issues with MinGW - a substitute declaration(correctByteOrder) for itoln that was not present in MinGW was being used. Duplicated the declaration from (tried including but gave some errors) and added the appropriate link library, wsock32, according to MinGW documentation. --- intern/guardedalloc/MEM_sys_types.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'intern/guardedalloc') diff --git a/intern/guardedalloc/MEM_sys_types.h b/intern/guardedalloc/MEM_sys_types.h index 48230db23a3..4debb32b5c4 100644 --- a/intern/guardedalloc/MEM_sys_types.h +++ b/intern/guardedalloc/MEM_sys_types.h @@ -98,7 +98,8 @@ typedef unsigned long uintptr_t; #include #elif defined(FREE_WINDOWS) - +/* define htoln here, there must be a syntax error in winsock2.h in MinGW */ +unsigned long __attribute__((__stdcall__)) htonl(unsigned long); #include #else @@ -109,12 +110,14 @@ typedef unsigned long uintptr_t; #endif /* ifdef platform for types */ #ifdef _WIN32 +#ifndef FREE_WINDOWS #ifndef htonl #define htonl(x) correctByteOrder(x) #endif #ifndef ntohl #define ntohl(x) correctByteOrder(x) #endif +#endif #elif defined (__FreeBSD__) || defined (__OpenBSD__) #include #elif defined (__APPLE__) -- cgit v1.2.3