From: Luotao Fu 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 --- # 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 */ ) {