diff options
Diffstat (limited to 'source/blender/blenloader/BLO_sys_types.h')
-rw-r--r-- | source/blender/blenloader/BLO_sys_types.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/source/blender/blenloader/BLO_sys_types.h b/source/blender/blenloader/BLO_sys_types.h index 2114fc34bf1..4b3902dca43 100644 --- a/source/blender/blenloader/BLO_sys_types.h +++ b/source/blender/blenloader/BLO_sys_types.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__) |