gpsd-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gpsd-dev] [PATCH] gpsd: fix compile error when reconfigure=no


From: spdawson
Subject: [gpsd-dev] [PATCH] gpsd: fix compile error when reconfigure=no
Date: Mon, 2 Dec 2013 10:04:45 +0000

From: Simon Dawson <address@hidden>

When building with reconfigure=no, the build fails as follows.

  libgpsd_core.c: In function 'gpsd_poll':
  libgpsd_core.c:1236:35: error: 'const struct gps_type_t' has no member named 
'mode_switcher'
  scons: *** [libgpsd_core.os] Error 1
  scons: building terminated because of errors.
  make: *** [/scratch/peko/build/gpsd-3.10/.stamp_built] Error 2

The problem appears to be a failure to protect the mode_switcher field with
a RECONFIGURE_ENABLE ifdef.

Signed-off-by: Simon Dawson <address@hidden>
---

diff -Nurp a/libgpsd_core.c b/libgpsd_core.c
--- a/libgpsd_core.c    2013-11-21 08:57:44.000000000 +0000
+++ b/libgpsd_core.c    2013-12-02 09:57:57.250335098 +0000
@@ -1232,8 +1232,12 @@ gps_mask_t gpsd_poll(struct gps_device_t
                 * previous mode switch to binary succeeded in suppressing
                 * NMEA).
                 */
+#ifdef RECONFIGURE_ENABLE
                bool dependent_nmea = (newtype == NMEA_PACKET
                                       && 
session->device_type->mode_switcher!=NULL);
+#else
+               bool dependent_nmea = false;
+#endif /* RECONFIGURE_ENABLE */
 
                /*
                 * Compute whether to switch drivers.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]