diff os_support.c @ 2085:8fc44b349f59 libavformat

initial mingw networking support
author alex
date Tue, 15 May 2007 14:58:30 +0000
parents 857fbfeb2fa0
children 995baffaa001
line wrap: on
line diff
--- a/os_support.c	Sat May 12 22:17:40 2007 +0000
+++ b/os_support.c	Tue May 15 14:58:30 2007 +0000
@@ -117,10 +117,14 @@
 
 int ff_socket_nonblock(int socket, int enable)
 {
+#ifdef __MINGW32__
+   return ioctlsocket(socket, FIONBIO, &enable);
+#else
    if (enable)
       return fcntl(socket, F_SETFL, fcntl(socket, F_GETFL) | O_NONBLOCK);
    else
       return fcntl(socket, F_SETFL, fcntl(socket, F_GETFL) & ~O_NONBLOCK);
+#endif
 }
 #endif /* CONFIG_NETWORK */