From d898a7d56d9f9a9fc877049ad7f2b31dc1a5a6e7 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Mon, 2 Mar 2015 06:33:54 -0500 Subject: Use pselect unconditionally. We're assuming POSIX-2001.1 conformance. All regression tests pass. --- libgpsd_core.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'libgpsd_core.c') diff --git a/libgpsd_core.c b/libgpsd_core.c index 16ac261e..a8cd72e3 100644 --- a/libgpsd_core.c +++ b/libgpsd_core.c @@ -998,9 +998,6 @@ int gpsd_await_data(/*@out@*/fd_set *rfds, /* await data from any socket in the all_fds set */ { int status; -#ifdef COMPAT_SELECT - struct timeval tv; -#endif /* COMPAT_SELECT */ FD_ZERO(efds); (void)memcpy((char *)rfds, (char *)all_fds, sizeof(fd_set)); @@ -1013,20 +1010,14 @@ int gpsd_await_data(/*@out@*/fd_set *rfds, * select(2) has to poll here as small as possible (for * low-clock-rate SBCs and the like). * - * pselect() is preferable, when we can have it, to eliminate + * pselect() is preferable to vanilla select, to eliminate * the once-per-second wakeup when no sensors are attached. * This cuts power consumption. */ /*@ -usedef -nullpass @*/ errno = 0; -#ifdef COMPAT_SELECT - tv.tv_sec = 1; - tv.tv_usec = 0; - status = select(maxfd + 1, rfds, NULL, NULL, &tv); -#else status = pselect(maxfd + 1, rfds, NULL, NULL, NULL, NULL); -#endif if (status == -1) { if (errno == EINTR) return AWAIT_NOT_READY; -- cgit v1.2.1