diff options
author | Simon Dawson <spdawson@gmail.com> | 2013-12-08 10:17:27 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2014-01-03 04:58:26 -0500 |
commit | 182454be8b437296350a57d85f51698d313d5c3e (patch) | |
tree | b107440773e63d8066e1a838b9ac3323ed4b5c46 /gpsmon.c | |
parent | 2300c5fc276aa91bd32665210fe35a4c4f9f25ad (diff) | |
download | gpsd-182454be8b437296350a57d85f51698d313d5c3e.tar.gz |
gpsmon: fix build when reconfigure is false
When reconfigure is False and ncurses support is enabled, the build fails as
follows.
gpsmon.o: In function `gpsd_write':
gpsmon.c:(.text+0xbbc): undefined reference to `monitor_dump_send'
gpsmon.o: In function `main':
gpsmon.c:(.text.startup+0xd68): undefined reference to `announce_log'
collect2: error: ld returned 1 exit status
scons: *** [gpsmon] Error 1
scons: building terminated because of errors.
The problem appears to be a failure to protect calls to momnitor_dump_send
and announce_log with appropriate #ifdef guards.
Signed-off-by: Simon Dawson <spdawson@gmail.com>
Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
Diffstat (limited to 'gpsmon.c')
-rw-r--r-- | gpsmon.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -632,7 +632,9 @@ ssize_t gpsd_write(struct gps_device_t *session, const size_t len) /* pass low-level data to devices, echoing it to the log window */ { +#if defined(CONTROLSEND_ENABLE) || defined(RECONFIGURE_ENABLE) monitor_dump_send((const char *)buf, len); +#endif /* defined(CONTROLSEND_ENABLE) || defined(RECONFIGURE_ENABLE) */ return gpsd_serial_write(session, buf, len); } @@ -823,7 +825,9 @@ static bool do_command(const char *line) context.readonly = !context.readonly; else context.readonly = (atoi(line + 1) == 0); +#ifdef RECONFIGURE_ENABLE announce_log("[probing %sabled]", context.readonly ? "dis" : "en"); +#endif /* RECONFIGURE_ENABLE */ if (!context.readonly) /* magic - forces a reconfigure */ session.packet.counter = 0; |