From 2892239a86f6e0c321ab1439f48c0fd6fd7c7655 Mon Sep 17 00:00:00 2001 From: dimitri staessens Date: Fri, 11 Aug 2017 13:27:50 +0200 Subject: irmd: Fix mainloop timeout on OS X --- src/irmd/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/irmd') 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) -- cgit v1.2.3