[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gpsd-dev] [PATCH] Complete wrapping of ntpshm_latch function in #ifdef
From: |
Simon Dawson |
Subject: |
[gpsd-dev] [PATCH] Complete wrapping of ntpshm_latch function in #ifdef NTPSHM_ENABLE |
Date: |
Wed, 3 Sep 2014 18:43:31 +0100 |
Currently, the build fails as follows
gpsmon.o: In function `gpsmon_hook':
gpsmon.c:(.text+0x8b0): undefined reference to `ntpshm_latch'
collect2: error: ld returned 1 exit status
scons: *** [gpsmon] Error 1
Signed-off-by: Simon Dawson <address@hidden>
---
gpsd.h-tail | 2 ++
gpsmon.c | 2 ++
2 files changed, 4 insertions(+)
diff --git a/gpsd.h-tail b/gpsd.h-tail
index 7b62ce1..7b44f91 100644
--- a/gpsd.h-tail
+++ b/gpsd.h-tail
@@ -857,7 +857,9 @@ extern unsigned int ais_binary_encode(struct ais_t *ais,
/address@hidden@*/unsigned char
extern void ntpshm_context_init(struct gps_context_t *);
extern void ntpshm_session_init(struct gps_device_t *);
extern int ntpshm_put(struct gps_device_t *, int, struct timedrift_t *);
+#ifdef NTPSHM_ENABLE
extern void ntpshm_latch(struct gps_device_t *device,
/address@hidden@*/struct timedrift_t *td);
+#endif /* NTPSHM_ENABLE */
extern void ntpshm_link_deactivate(struct gps_device_t *);
extern void ntpshm_link_activate(struct gps_device_t *);
diff --git a/gpsmon.c b/gpsmon.c
index c812063..909f271 100644
--- a/gpsmon.c
+++ b/gpsmon.c
@@ -734,8 +734,10 @@ static void gpsmon_hook(struct gps_device_t *device,
gps_mask_t changed UNUSED)
report_unlock();
+#ifdef NTPSHM_ENABLE
/* Update the last fix time seen for PPS. */
ntpshm_latch(device, &td);
+#endif /* NTPSHM_ENABLE */
}
/address@hidden +nullpass +globstate +compdef address@hidden/
--
1.9.1
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gpsd-dev] [PATCH] Complete wrapping of ntpshm_latch function in #ifdef NTPSHM_ENABLE,
Simon Dawson <=