blob: 087bdbe9295fcf525169bfd84649aa0ce7e154f5 (
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>
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>
---
libgpsd_core.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/libgpsd_core.c b/libgpsd_core.c
index 8220eae..71dd5ba 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 */
) {
--
1.6.2.1
|