From ba472aaf010e69661866decbd3cfde177d8c0ee9 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Fri, 27 Apr 2007 00:41:50 +0000 Subject: implement ff_socket_nonblock and use it in networking code Originally committed as revision 8846 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavformat/tcp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'libavformat/tcp.c') diff --git a/libavformat/tcp.c b/libavformat/tcp.c index b2f6d37a76..36b67076af 100644 --- a/libavformat/tcp.c +++ b/libavformat/tcp.c @@ -22,7 +22,6 @@ #include #include "network.h" #include -#include typedef struct TCPContext { int fd; @@ -62,7 +61,7 @@ static int tcp_open(URLContext *h, const char *uri, int flags) fd = socket(AF_INET, SOCK_STREAM, 0); if (fd < 0) goto fail; - fcntl(fd, F_SETFL, O_NONBLOCK); + ff_socket_nonblock(fd, 1); redo: ret = connect(fd, (struct sockaddr *)&dest_addr, -- cgit v1.2.3