summaryrefslogtreecommitdiff
path: root/libgpsd_core.c
diff options
context:
space:
mode:
authorGary E. Miller <gem@rellim.com>2010-07-20 23:34:48 -0700
committerGary E. Miller <gem@rellim.com>2010-07-20 23:34:48 -0700
commit2625079b6db539441cba4582718eae4babf5bec3 (patch)
tree6414d47cb26542b79fddf4809c7d0fb392340028 /libgpsd_core.c
parenta2d52ffe40b99002d70b68c2108d7c18f6464774 (diff)
downloadgpsd-2625079b6db539441cba4582718eae4babf5bec3.tar.gz
Hide the kernel PPS code when timepps.h not found.
Diffstat (limited to 'libgpsd_core.c')
-rw-r--r--libgpsd_core.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libgpsd_core.c b/libgpsd_core.c
index d3c6636b..6bfb2395 100644
--- a/libgpsd_core.c
+++ b/libgpsd_core.c
@@ -371,13 +371,14 @@ static /*@null@*/ void *gpsd_ppsmonitor(void *arg)
gpsd_report(LOG_RAW, log);
}
if (0 != ok) {
+#if defined(HAVE_TIMEPPS_H)
if ( use_kernelpps ) {
/* ntpshm_pps() expects usec, not nsec */
pi.clear_timestamp.tv_nsec /= 1000;
(void)ntpshm_pps(session, &pi.clear_timestamp);
- } else {
+ } else
+#endif
(void)ntpshm_pps(session, &tv);
- }
} else {
gpsd_report(LOG_INF, "PPS pulse rejected\n");
}