blob: e3e166be31d7430d4b25c7e412a93b799b7daa96 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
From: Luotao Fu <l.fu@pengutronix.de>
Date: Sun, 30 Oct 2011 22:33:40 +0100
Subject: [PATCH] fix core compiling with nmea disabled
struct nmea is only defined in the driver union if NMEA_ENABLED is set.
libpgsd_core however acquires if the ignore_trailing_edge in nmea is set
or not carelessly if NMEA_ENABLED is set. Add an additional ifdef of
NMEA_ENABLE to fix this.
Signed-off-by: Luotao Fu <l.fu@pengutronix.de>
---
# 20110222 wsa: fixed in master meanwhile
libgpsd_core.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/libgpsd_core.c b/libgpsd_core.c
index 28f787d..4109369 100644
--- a/libgpsd_core.c
+++ b/libgpsd_core.c
@@ -206,7 +206,7 @@ static /*@null@*/void *gpsd_ppsmonitor(void *arg)
} else if (cycle > 999000 && cycle < 1001000 ) {
/* looks like PPS pulse or square wave */
if (duration > 499000 && duration < 501000
-#ifdef GPSCLOCK_ENABLE
+#if defined(NMEA_ENABLE) && defined(GPSCLOCK_ENABLE)
&& session->driver.nmea.ignore_trailing_edge
#endif /* GPSCLOCK_ENABLE */
) {
|