From a1dc48491f548a248ef01a2ca720a8fd34c2c0e8 Mon Sep 17 00:00:00 2001 From: jstebbins <jstebbins.hb@gmail.com> Date: Sat, 23 Oct 2010 18:18:22 +0000 Subject: 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 --- libhb/ports.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'libhb') 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> -- cgit v1.2.3