OSDN Git Service

reorder #includes to fix redefinition problem in mingw64
authorjstebbins <jstebbins@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Sat, 23 Oct 2010 18:18:22 +0000 (18:18 +0000)
committerjstebbins <jstebbins@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Sat, 23 Oct 2010 18:18:22 +0000 (18:18 +0000)
if winsock2.h isn't included before windows.h, different
conflicting definitions are used for several macros and typedefs

git-svn-id: svn://localhost/HandBrake/trunk@3613 b64f7644-9d1e-0410-96f1-a4d463321fa5

libhb/ports.c

index 7e5421d..dbfcb66 100644 (file)
 #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
 #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>