summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordimitri staessens <dimitri.staessens@ugent.be>2017-08-11 13:27:50 +0200
committerdimitri staessens <dimitri.staessens@ugent.be>2017-08-11 13:27:50 +0200
commit2892239a86f6e0c321ab1439f48c0fd6fd7c7655 (patch)
treebe375153a3c4e5a7c976dc809b4dab04e28d5c16
parentaecf3810c22ac5e904b0eb7bfe26e3168f3f4f43 (diff)
downloadouroboros-2892239a86f6e0c321ab1439f48c0fd6fd7c7655.tar.gz
ouroboros-2892239a86f6e0c321ab1439f48c0fd6fd7c7655.zip
irmd: Fix mainloop timeout on OS X
-rw-r--r--src/irmd/main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/irmd/main.c b/src/irmd/main.c
index de4a07ab..d93f1755 100644
--- a/src/irmd/main.c
+++ b/src/irmd/main.c
@@ -1687,7 +1687,7 @@ void * mainloop(void * o)
(void) o;
while (true) {
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__) || defined(__APPLE__)
fd_set fds;
struct timeval timeout = {(IRMD_ACCEPT_TIMEOUT / 1000),
(IRMD_ACCEPT_TIMEOUT % 1000) * 1000};
@@ -1710,7 +1710,7 @@ void * mainloop(void * o)
}
ret_msg.code = IRM_MSG_CODE__IRM_REPLY;
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__) || defined(__APPLE__)
FD_ZERO(&fds);
FD_SET(irmd.sockfd, &fds);
if (select(irmd.sockfd + 1, &fds, NULL, NULL, &timeout) <= 0)