diff options
Diffstat (limited to 'patches/gpsd-2.39/gpsd-2.39-fix-core-compiling-with-nmea-disabled.diff')
-rw-r--r-- | patches/gpsd-2.39/gpsd-2.39-fix-core-compiling-with-nmea-disabled.diff | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/patches/gpsd-2.39/gpsd-2.39-fix-core-compiling-with-nmea-disabled.diff b/patches/gpsd-2.39/gpsd-2.39-fix-core-compiling-with-nmea-disabled.diff new file mode 100644 index 000000000..087bdbe92 --- /dev/null +++ b/patches/gpsd-2.39/gpsd-2.39-fix-core-compiling-with-nmea-disabled.diff @@ -0,0 +1,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 + |