From: spdawson at gmail.com <spdawson@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] gpsd: fix build error when reconfigure disabled
Date: Mon, 2 Dec 2013 10:10:25 +0000 [thread overview]
Message-ID: <1385979025-7231-1-git-send-email-spdawson@gmail.com> (raw)
From: Simon Dawson <spdawson@gmail.com>
Fixes build failures such as the following.
http://autobuild.buildroot.net/results/424/42409545547daddd77c9e9bd59474ed033834ad5/
Note that the gpsd patch has been sent, but not yet accepted, upstream.
Signed-off-by: Simon Dawson <spdawson@gmail.com>
---
...04-fix-reconfigure-disabled-compile-error.patch | 33 ++++++++++++++++++++++
1 file changed, 33 insertions(+)
create mode 100644 package/gpsd/gpsd-04-fix-reconfigure-disabled-compile-error.patch
diff --git a/package/gpsd/gpsd-04-fix-reconfigure-disabled-compile-error.patch b/package/gpsd/gpsd-04-fix-reconfigure-disabled-compile-error.patch
new file mode 100644
index 0000000..90b4dc2
--- /dev/null
+++ b/package/gpsd/gpsd-04-fix-reconfigure-disabled-compile-error.patch
@@ -0,0 +1,33 @@
+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
+
+For an example, see the following autobuild failure.
+
+ http://autobuild.buildroot.net/results/424/42409545547daddd77c9e9bd59474ed033834ad5/
+
+The problem appears to be a failure to protect the mode_switcher field with
+a RECONFIGURE_ENABLE ifdef.
+
+Signed-off-by: Simon Dawson <spdawson@gmail.com>
+
+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.
--
1.8.3.2
reply other threads:[~2013-12-02 10:10 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1385979025-7231-1-git-send-email-spdawson@gmail.com \
--to=spdawson@gmail.com \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox