diff options
author | Simon Dawson <spdawson@gmail.com> | 2014-08-25 10:31:18 +0100 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2014-08-25 05:37:59 -0400 |
commit | 80cd103396fcd1185a476761bfb267ce12f64b32 (patch) | |
tree | 6e00efc2403a3a933dd64c4a3473a85ab6fcc805 | |
parent | dbdd6dec471d6a5614379bb6673342873294bc32 (diff) | |
download | gpsd-80cd103396fcd1185a476761bfb267ce12f64b32.tar.gz |
Fix build error when ntpshm is false
The build fails as follows
libgpsd_core.c: In function 'ntpshm_latch':
libgpsd_core.c:1660:24: error: 'const struct gps_type_t' has no member named 'time_offset'
|| device->device_type->time_offset == NULL)
^
libgpsd_core.c:1663:33: error: 'const struct gps_type_t' has no member named 'time_offset'
fix_time += device->device_type->time_offset(device);
^
scons: *** [libgpsd_core.os] Error 1
The solution is to wrap #ifdef NTPSHM_ENABLE around the ntpshm_latch function
Signed-off-by: Simon Dawson <spdawson@gmail.com>
-rw-r--r-- | libgpsd_core.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libgpsd_core.c b/libgpsd_core.c index 6ec08a4d..f7e8075c 100644 --- a/libgpsd_core.c +++ b/libgpsd_core.c @@ -1638,6 +1638,7 @@ void gpsd_zero_satellites( /*@out@*/ struct gps_data_t *out) #endif } +#ifdef NTPSHM_ENABLE void ntpshm_latch(struct gps_device_t *device, struct timedrift_t /*@out@*/*td) /* latch the fact that we've saved a fix */ { @@ -1668,5 +1669,6 @@ void ntpshm_latch(struct gps_device_t *device, struct timedrift_t /*@out@*/*td) device->last_fixtime.clock = td->clock.tv_sec + td->clock.tv_nsec / 1e9; #endif /* S_SPLINT_S */ } +#endif /* NTPSHM_ENABLE */ /* end */ |