kumquat-buildroot/package/gpsd/gpsd-03-Fix-ubx_mode-link-error-when-reconfigure-false.patch
Simon Dawson 6b6255bf94 gpsd: backport upstream patches pending 3.11 release
The 3.11 release of gpsd is imminent; in the meantime, backport some patches
from upstream to fix some of the autobuild failures.

Also bump to the most recent Git snapshot.

Signed-off-by: Simon Dawson <spdawson@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2013-12-10 10:03:02 +01:00

49 lines
1.8 KiB
Diff

When reconfigure is false, the link step fails as follows.
/scratch/peko/host/usr/bin/arm-buildroot-linux-uclibcgnueabi-gcc -o gpsd -pthread --sysroot=/scratch/peko/host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot gpsd.o ntpshm.o shmexport.o dbusexport.o -L. -L/scratch/peko/host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib -lrt -lbluetooth -ldbus-1 -lgpsd -lusb-1.0 -lbluetooth -lgps -lm -ldbus-1 -lpthread -lrt
./libgpsd.so: undefined reference to `ubx_mode'
collect2: error: ld returned 1 exit status
scons: *** [gpsd] Error 1
scons: building terminated because of errors.
The problem appears to be a failure to guard a call to ubx_mode with a
RECONFIGURE_ENABLE ifdef.
Signed-off-by: Simon Dawson <spdawson@gmail.com>
---
driver_ubx.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/driver_ubx.c b/driver_ubx.c
index d75bbf8..9554a96 100644
--- a/driver_ubx.c
+++ b/driver_ubx.c
@@ -68,7 +68,9 @@ static gps_mask_t ubx_msg_nav_svinfo(struct gps_device_t *session,
unsigned char *buf, size_t data_len);
static void ubx_msg_sbas(struct gps_device_t *session, unsigned char *buf);
static void ubx_msg_inf(unsigned char *buf, size_t data_len, const int debug);
+#ifdef RECONFIGURE_ENABLE
static void ubx_mode(struct gps_device_t *session, int mode);
+#endif /* RECONFIGURE_ENABLE */
/**
* Navigation solution message
@@ -645,12 +647,14 @@ static void ubx_event_hook(struct gps_device_t *session, event_t event)
(void)ubx_write(session, UBX_CLASS_MON, 0x04, msg, 0);
/*@ +type @*/
+#ifdef RECONFIGURE_ENABLE
/*
* Turn off NMEA output, turn on UBX on this port.
*/
if (session->mode == O_OPTIMIZE) {
ubx_mode(session, MODE_BINARY);
}
+#endif /* RECONFIGURE_ENABLE */
} else if (event == event_deactivate) {
/*@ -type @*/
unsigned char msg[4] = {
--
1.8.3.2