[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gpsd-dev] [PATCH] Fix ubx_mode link error when reconfigure=false
From: |
spdawson |
Subject: |
[gpsd-dev] [PATCH] Fix ubx_mode link error when reconfigure=false |
Date: |
Sun, 8 Dec 2013 09:11:34 +0000 |
From: Simon Dawson <address@hidden>
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 <address@hidden>
---
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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gpsd-dev] [PATCH] Fix ubx_mode link error when reconfigure=false,
spdawson <=