aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/os_support.c
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2007-05-15 14:58:30 +0000
committerAlex Beregszaszi <alex@rtfs.hu>2007-05-15 14:58:30 +0000
commit5676d140a9e93aeead7b17f01d42fb8987b1dd60 (patch)
tree46929e739b9164ebd43074e38f4035a8da12489d /libavformat/os_support.c
parent124bed6fb2dfb937ea7b76121d5f8eba47d15d68 (diff)
downloadffmpeg-5676d140a9e93aeead7b17f01d42fb8987b1dd60.tar.gz
initial mingw networking support
Originally committed as revision 9029 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/os_support.c')
-rw-r--r--libavformat/os_support.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavformat/os_support.c b/libavformat/os_support.c
index abee749aac..bcb62b8528 100644
--- a/libavformat/os_support.c
+++ b/libavformat/os_support.c
@@ -117,10 +117,14 @@ int resolve_host(struct in_addr *sin_addr, const char *hostname)
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 */