summaryrefslogtreecommitdiff
path: root/libgps_sock.c
diff options
context:
space:
mode:
authorGary E. Miller <gem@rellim.com>2018-12-26 17:16:48 -0800
committerGary E. Miller <gem@rellim.com>2018-12-26 17:16:48 -0800
commit959c6722c5d043394c0795b35c7dd54d8cd26476 (patch)
tree2712e5b87a7d7c6bfa137e27d6fbb38b30cf2850 /libgps_sock.c
parent73620da884724a9266c7437a7814fa4faeffbabd (diff)
downloadgpsd-959c6722c5d043394c0795b35c7dd54d8cd26476.tar.gz
libgps_sock: Fix to the fix for pselect() change.
Diffstat (limited to 'libgps_sock.c')
-rw-r--r--libgps_sock.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libgps_sock.c b/libgps_sock.c
index eea8a04d..808d837a 100644
--- a/libgps_sock.c
+++ b/libgps_sock.c
@@ -144,8 +144,8 @@ bool gps_sock_waiting(const struct gps_data_t *gpsdata, int timeout)
FD_ZERO(&rfds);
FD_SET(gpsdata->gps_fd, &rfds);
- tv.tv_sec = timeout / NS_IN_SEC;
- tv.tv_nsec = timeout % NS_IN_SEC;
+ tv.tv_sec = timeout / US_IN_SEC;
+ tv.tv_nsec = (timeout % US_IN_SEC) * 1000;
/* all error conditions return "not waiting" -- crude but effective */
return (pselect(gpsdata->gps_fd + 1, &rfds, NULL, NULL, &tv, NULL) == 1);
#else