diff options
author | dimitri staessens <dimitri.staessens@ugent.be> | 2017-08-11 11:35:51 +0000 |
---|---|---|
committer | Sander Vrijders <sander.vrijders@ugent.be> | 2017-08-11 11:35:51 +0000 |
commit | 79f38fef2d8f10e9a9d94b4e57283b52d6a4967d (patch) | |
tree | be375153a3c4e5a7c976dc809b4dab04e28d5c16 /src/irmd/main.c | |
parent | f957c2c499f8093ae86e673e2170f9dbfdcb761a (diff) | |
parent | 2892239a86f6e0c321ab1439f48c0fd6fd7c7655 (diff) | |
download | ouroboros-79f38fef2d8f10e9a9d94b4e57283b52d6a4967d.tar.gz ouroboros-79f38fef2d8f10e9a9d94b4e57283b52d6a4967d.zip |
Merged in dstaesse/ouroboros/be-apple (pull request #549)
irmd: Fix mainloop timeout on OS X
Diffstat (limited to 'src/irmd/main.c')
-rw-r--r-- | src/irmd/main.c | 4 |
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) |