aboutsummaryrefslogtreecommitdiffstats
path: root/src/listen.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/listen.c')
-rw-r--r--src/listen.c2
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));
}