From 36c07acd595288c2747d491993d044b81593b00c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= Date: Thu, 15 Feb 2007 13:32:06 +0000 Subject: [PATCH] MinGW patch by , reworked. Removed placeholder for winsock. Originally committed as revision 7990 to svn://svn.ffmpeg.org/ffmpeg/trunk --- configure | 2 ++ libavformat/os_support.c | 5 +++++ libavformat/os_support.h | 8 ++------ 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/configure b/configure index 53f65d2f76..052b22ac16 100755 --- a/configure +++ b/configure @@ -1572,6 +1572,8 @@ fi enabled audio_beos && add_extralibs "-lmedia -lbe" +enabled mingw32 && add_extralibs -lws2_32 + ########################################## # imlib check diff --git a/libavformat/os_support.c b/libavformat/os_support.c index 8372af2921..5427c567e6 100644 --- a/libavformat/os_support.c +++ b/libavformat/os_support.c @@ -35,9 +35,14 @@ #include #endif #include + #ifndef HAVE_SYS_POLL_H +#if defined(__MINGW32__) +#include +#else #include #endif +#endif /** * gets the current time in micro seconds. diff --git a/libavformat/os_support.h b/libavformat/os_support.h index f65755ad30..34c2fabcd3 100644 --- a/libavformat/os_support.h +++ b/libavformat/os_support.h @@ -32,7 +32,7 @@ * - floatf() (OS/2) * - strcasecmp() (OS/2) * - closesocket() - * - poll() (BeOS) + * - poll() (BeOS, MinGW) */ #if defined(__BEOS__) || defined(__INNOTEK_LIBC__) @@ -45,11 +45,7 @@ __declspec(dllimport) void __stdcall Sleep(unsigned long dwMilliseconds); # define usleep(t) Sleep((t) / 1000) # include # define lseek(f,p,w) _lseeki64((f), (p), (w)) -#endif - -/* XXX: check for Winsock here */ -#if 0 -#define HAVE_CLOSESOCKET 1 +# define HAVE_CLOSESOCKET 1 #endif #ifdef __BEOS__