changeset 1798:d1e61f4d02cd libavformat

MinGW patch by <koyama AT infocity DOT co DOT jp>, reworked. Removed placeholder for winsock.
author mmu_man
date Thu, 15 Feb 2007 13:32:06 +0000
parents 20c8dfd3ee84
children 0dc3a767943d
files os_support.c os_support.h
diffstat 2 files changed, 7 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/os_support.c	Thu Feb 15 07:44:10 2007 +0000
+++ b/os_support.c	Thu Feb 15 13:32:06 2007 +0000
@@ -35,9 +35,14 @@
 #include <sys/time.h>
 #endif
 #include <time.h>
+
 #ifndef HAVE_SYS_POLL_H
+#if defined(__MINGW32__)
+#include <winsock2.h>
+#else
 #include <sys/select.h>
 #endif
+#endif
 
 /**
  * gets the current time in micro seconds.
--- a/os_support.h	Thu Feb 15 07:44:10 2007 +0000
+++ b/os_support.h	Thu Feb 15 13:32:06 2007 +0000
@@ -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 @@
 #  define usleep(t)    Sleep((t) / 1000)
 #  include <fcntl.h>
 #  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__