summaryrefslogtreecommitdiffstats
path: root/libhb
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2010-10-23 18:18:22 +0000
committerjstebbins <[email protected]>2010-10-23 18:18:22 +0000
commita1dc48491f548a248ef01a2ca720a8fd34c2c0e8 (patch)
treeb60553e0684a3a63a0d6ae585e21491ebb4f5f0a /libhb
parented149006a5c0cc67243a517b44a55f0d0de04ea4 (diff)
reorder #includes to fix redefinition problem in mingw64
if winsock2.h isn't included before windows.h, different conflicting definitions are used for several macros and typedefs git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3613 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb')
-rw-r--r--libhb/ports.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/libhb/ports.c b/libhb/ports.c
index 7e5421da1..dbfcb66b3 100644
--- a/libhb/ports.c
+++ b/libhb/ports.c
@@ -27,6 +27,16 @@
#include <machine/cpu.h>
#endif
+#ifdef SYS_MINGW
+#include <winsock2.h>
+#include <ws2tcpip.h>
+#else
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netdb.h>
+#include <netinet/in.h>
+#endif
+
#ifdef SYS_CYGWIN
#include <windows.h>
#endif
@@ -43,17 +53,6 @@
#include <time.h>
#include <sys/time.h>
-
-#ifdef SYS_MINGW
-#include <winsock2.h>
-#include <ws2tcpip.h>
-#else
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netdb.h>
-#include <netinet/in.h>
-#endif
-
#if defined( SYS_LINUX )
#include <linux/cdrom.h>
#include <fcntl.h>