summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordimitri staessens <dimitri.staessens@ugent.be>2017-04-16 12:35:52 +0200
committerdimitri staessens <dimitri.staessens@ugent.be>2017-04-16 12:35:52 +0200
commit00a3eb081e83bda40eacd294345cfcd3b348c597 (patch)
tree265e306216513961b965060b699fb10bf6f4d1ca /src
parente543c43c9f911bbe40371e3c6ca5c916cb3365a9 (diff)
downloadouroboros-00a3eb081e83bda40eacd294345cfcd3b348c597.tar.gz
ouroboros-00a3eb081e83bda40eacd294345cfcd3b348c597.zip
irmd, ipcpd: Include socket in select() for FreeBSD
Fixes #41
Diffstat (limited to 'src')
-rw-r--r--src/ipcpd/ipcp.c2
-rw-r--r--src/irmd/main.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/ipcpd/ipcp.c b/src/ipcpd/ipcp.c
index 47c951f1..77fcb549 100644
--- a/src/ipcpd/ipcp.c
+++ b/src/ipcpd/ipcp.c
@@ -168,7 +168,7 @@ static void * ipcp_main_loop(void * o)
#ifdef __FreeBSD__
FD_ZERO(&fds);
FD_SET(ipcpi.sockfd, &fds);
- if (select(ipcpi.sockfd, &fds, NULL, NULL, &timeout) <= 0)
+ if (select(ipcpi.sockfd + 1, &fds, NULL, NULL, &timeout) <= 0)
continue;
#endif
lsockfd = accept(ipcpi.sockfd, 0, 0);
diff --git a/src/irmd/main.c b/src/irmd/main.c
index bdc03ef8..d55fbbc3 100644
--- a/src/irmd/main.c
+++ b/src/irmd/main.c
@@ -1736,7 +1736,7 @@ void * mainloop(void * o)
#ifdef __FreeBSD__
FD_ZERO(&fds);
FD_SET(irmd.sockfd, &fds);
- if (select(irmd.sockfd, &fds, NULL, NULL, &timeout) <= 0)
+ if (select(irmd.sockfd + 1, &fds, NULL, NULL, &timeout) <= 0)
continue;
#endif