diff options
Diffstat (limited to 'source/blender/blenloader/BLO_sys_types.h')
-rw-r--r-- | source/blender/blenloader/BLO_sys_types.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/source/blender/blenloader/BLO_sys_types.h b/source/blender/blenloader/BLO_sys_types.h index d56723ec1c5..4b3902dca43 100644 --- a/source/blender/blenloader/BLO_sys_types.h +++ b/source/blender/blenloader/BLO_sys_types.h @@ -83,7 +83,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> @@ -93,7 +93,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 @@ -105,8 +106,14 @@ typedef unsigned long uintptr_t; #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__) |