summaryrefslogtreecommitdiffstats
path: root/libdaemon/dnonblock.c
diff options
context:
space:
mode:
Diffstat (limited to 'libdaemon/dnonblock.c')
-rw-r--r--libdaemon/dnonblock.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libdaemon/dnonblock.c b/libdaemon/dnonblock.c
index c16d511..ff1f28d 100644
--- a/libdaemon/dnonblock.c
+++ b/libdaemon/dnonblock.c
@@ -33,12 +33,12 @@ int daemon_nonblock(int fd, int b) {
return -1;
if (b)
- c = a | O_NDELAY;
+ c = a | O_NONBLOCK;
else
- c = a & ~O_NDELAY;
+ c = a & ~O_NONBLOCK;
if (c == a)
return 0;
- return fcntl(fd, F_SETFL, a);
+ return fcntl(fd, F_SETFL, c);
}