aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-11-08 22:24:02 +0100
committerMax Kellermann <max@duempel.org>2009-11-08 22:24:02 +0100
commit1a4025420c608b34d1eebb1f39ec86a88bf694a9 (patch)
treedef4bbedb1e58a4681192e9860b861f8295471c2
parent223b0db5bd6c18eb86308eae4497a801180537df (diff)
downloadmpd-1a4025420c608b34d1eebb1f39ec86a88bf694a9.tar.gz
mpd-1a4025420c608b34d1eebb1f39ec86a88bf694a9.tar.xz
mpd-1a4025420c608b34d1eebb1f39ec86a88bf694a9.zip
fd_util: added missing NONBLOCK fallback for socket()
Diffstat (limited to '')
-rw-r--r--src/fd_util.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/fd_util.c b/src/fd_util.c
index bb03dbcb2..8f142e34a 100644
--- a/src/fd_util.c
+++ b/src/fd_util.c
@@ -180,8 +180,10 @@ socket_cloexec_nonblock(int domain, int type, int protocol)
#endif
fd = socket(domain, type, protocol);
- if (fd >= 0)
+ if (fd >= 0) {
fd_set_cloexec(fd, true);
+ fd_set_nonblock(fd);
+ }
return fd;
}