diff options
author | Simon Dawson <spdawson@gmail.com> | 2013-12-08 09:11:34 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2014-01-03 04:58:13 -0500 |
commit | 2300c5fc276aa91bd32665210fe35a4c4f9f25ad (patch) | |
tree | 680e347bf13cb07d1c59ca287872c7c5788cdff1 /driver_ubx.c | |
parent | e80451a097589404a450d66627bfe4e433b7e110 (diff) | |
download | gpsd-2300c5fc276aa91bd32665210fe35a4c4f9f25ad.tar.gz |
Fix ubx_mode link error when reconfigure=false
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>
Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
Diffstat (limited to 'driver_ubx.c')
-rw-r--r-- | driver_ubx.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/driver_ubx.c b/driver_ubx.c index d75bbf83..9554a969 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] = { |