Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorAntony Riakiotakis <kalast@gmail.com>2011-09-06 15:17:29 +0400
committerAntony Riakiotakis <kalast@gmail.com>2011-09-06 15:17:29 +0400
commitaabd702dbdbba5af116f37c401f6a17f0ac714ca (patch)
tree29234810adab7cb85aab3bd017fbb8b5aa51b91f /source
parent7062788017cfb2841596d15f7c37612312692195 (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 'source')
-rw-r--r--source/blender/blenloader/BLO_sys_types.h9
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__)