summaryrefslogtreecommitdiff
path: root/libgpsd_core.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2015-03-02 06:33:54 -0500
committerEric S. Raymond <esr@thyrsus.com>2015-03-02 06:33:54 -0500
commitd898a7d56d9f9a9fc877049ad7f2b31dc1a5a6e7 (patch)
tree2f673beb27c06a4e0e38214d9f4e93bf9d34c3b8 /libgpsd_core.c
parentede118ecbb53c2e903965a67d57f841ce4b8fc85 (diff)
downloadgpsd-d898a7d56d9f9a9fc877049ad7f2b31dc1a5a6e7.tar.gz
Use pselect unconditionally. We're assuming POSIX-2001.1 conformance.
All regression tests pass.
Diffstat (limited to 'libgpsd_core.c')
-rw-r--r--libgpsd_core.c11
1 files changed, 1 insertions, 10 deletions
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;