diff options
author | Eric Wong <normalperson@yhbt.net> | 2008-03-26 10:39:03 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2008-03-26 10:39:03 +0000 |
commit | 232c9f6c41387bc3cf1c239e0ce4caafbbb76c67 (patch) | |
tree | a59f599bae44be0c0744c370134e7786bc243bbc /src/listen.c | |
parent | 70dbc2b0e76f479961bd0ac326ee6a5d009cc170 (diff) |
notify: cleanups
* move set_nonblock{,ing}() into utils.c since we use it
elsewhere, too
* add proper error checking to set_nonblocking()
* use os_compat.h instead of individually #includ-ing system headers
git-svn-id: https://svn.musicpd.org/mpd/trunk@7217 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/listen.c')
-rw-r--r-- | src/listen.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/listen.c b/src/listen.c index e2b55a5d3..918bdb4aa 100644 --- a/src/listen.c +++ b/src/listen.c @@ -93,7 +93,7 @@ static int establishListen(unsigned int port, if ((sock = socket(pf, SOCK_STREAM, 0)) < 0) FATAL("socket < 0\n"); - if (fcntl(sock, F_SETFL, fcntl(sock, F_GETFL) | O_NONBLOCK) < 0) { + if (set_nonblocking(sock) < 0) { FATAL("problems setting nonblocking on listen socket: %s\n", strerror(errno)); } |