diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2011-09-06 15:17:29 +0400 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2011-09-06 15:17:29 +0400 |
commit | aabd702dbdbba5af116f37c401f6a17f0ac714ca (patch) | |
tree | 29234810adab7cb85aab3bd017fbb8b5aa51b91f /intern | |
parent | 7062788017cfb2841596d15f7c37612312692195 (diff) |
fix link issues with MinGW - a substitute declaration(correctByteOrder) for itoln that was not present in MinGW was being used. Duplicated the declaration from <winsock2.h>(tried including but gave some errors) and added the appropriate link library, wsock32, according to MinGW documentation.
Diffstat (limited to 'intern')
-rw-r--r-- | intern/guardedalloc/MEM_sys_types.h | 5 |
1 files changed, 4 insertions, 1 deletions
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 <inttypes.h> #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 <stdint.h> #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 <sys/param.h> #elif defined (__APPLE__) |