diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2014-04-29 16:17:58 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2014-04-29 16:17:58 +0200 |
commit | 9a86ce6ea990ac72337bffb78f663f8a904a408f (patch) | |
tree | b532fb296850eab0598d89452373170c9b4c1c1a /src/socket.c | |
parent | 639ebc2ff93adca5eb9e12d70a2e9e19731c84ba (diff) | |
download | fastd-9a86ce6ea990ac72337bffb78f663f8a904a408f.tar fastd-9a86ce6ea990ac72337bffb78f663f8a904a408f.zip |
Fold fastd_open_pipe into fastd_async_init, simpify fastd_setfl and fastd_setfd and move to fastd.h
Diffstat (limited to 'src/socket.c')
-rw-r--r-- | src/socket.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/socket.c b/src/socket.c index 2a8611d..0751a3c 100644 --- a/src/socket.c +++ b/src/socket.c @@ -27,8 +27,6 @@ #include "fastd.h" #include "poll.h" -#include <fcntl.h> - static int bind_socket(const fastd_bind_address_t *addr, bool warn) { int fd = -1; @@ -58,8 +56,8 @@ static int bind_socket(const fastd_bind_address_t *addr, bool warn) { if (fd < 0) goto error; - fastd_setfd(fd, FD_CLOEXEC, 0); - fastd_setfl(fd, O_NONBLOCK, 0); + fastd_setfd(fd, FD_CLOEXEC); + fastd_setfl(fd, O_NONBLOCK); int one = 1; |