diff options
Diffstat (limited to 'intern/guardedalloc/MEM_sys_types.h')
-rw-r--r-- | intern/guardedalloc/MEM_sys_types.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/intern/guardedalloc/MEM_sys_types.h b/intern/guardedalloc/MEM_sys_types.h index c5148e84ffe..4debb32b5c4 100644 --- a/intern/guardedalloc/MEM_sys_types.h +++ b/intern/guardedalloc/MEM_sys_types.h @@ -88,7 +88,7 @@ typedef unsigned long uintptr_t; #define _UINTPTR_T_DEFINED #endif -#elif defined(__linux__) || defined(__NetBSD__) +#elif defined(__linux__) || defined(__NetBSD__) || defined(__OpenBSD__) /* Linux-i386, Linux-Alpha, Linux-ppc */ #include <stdint.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__) |