[Buildroot] [PATCH v1] package/olsr: add upstream patch to fix compile with gpsd-3.23.1
Peter Seiderer
ps.report at gmx.net
Sat Nov 6 11:28:05 UTC 2021
- add upstream patch ([1]) to fix compile with gpsd-3.23.1
Fixes:
- http://autobuild.buildroot.org/results/53b06e72fb2d8b4c8b6ba41baf775ff33654cd18
- http://autobuild.buildroot.net/results/54cae924711e26f04045f8208db0d772292a3933
src/gpsdclient.c: In function 'nmeaInfoFromGpsd':
src/gpsdclient.c:374:30: error: 'STATUS_NO_FIX' undeclared (first use in this function); did you mean 'STATUS_PPS_FIX'?
374 | if (gpsdata->fix.status == STATUS_NO_FIX) {
| ^~~~~~~~~~~~~
| STATUS_PPS_FIX
[1] https://github.com/OLSR/olsrd/commit/69ae23be9f96b9e7dd68a0252f3ad05986bb222d
Signed-off-by: Peter Seiderer <ps.report at gmx.net>
---
Notes:
- @Fabrice: did not find a corresponding buildroot patch from you,
did you sent one and I missed it?
---
.../0005-pud-fix-build-with-gpsd-3.23.1.patch | 44 +++++++++++++++++++
1 file changed, 44 insertions(+)
create mode 100644 package/olsr/0005-pud-fix-build-with-gpsd-3.23.1.patch
diff --git a/package/olsr/0005-pud-fix-build-with-gpsd-3.23.1.patch b/package/olsr/0005-pud-fix-build-with-gpsd-3.23.1.patch
new file mode 100644
index 0000000000..a8d53482b9
--- /dev/null
+++ b/package/olsr/0005-pud-fix-build-with-gpsd-3.23.1.patch
@@ -0,0 +1,44 @@
+From 69ae23be9f96b9e7dd68a0252f3ad05986bb222d Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice at gmail.com>
+Date: Sun, 24 Oct 2021 23:22:11 +0200
+Subject: [PATCH] pud: fix build with gpsd >= 3.23.1
+
+Fix the following build failure raised with gpsd >= 3.23.1 and
+https://gitlab.com/gpsd/gpsd/-/commit/d4a4d8d3606fd50f10bcd20096a8a0cdb8b2d427:
+
+src/gpsdclient.c: In function 'nmeaInfoFromGpsd':
+src/gpsdclient.c:374:30: error: 'STATUS_NO_FIX' undeclared (first use in this function); did you mean 'STATUS_PPS_FIX'?
+ 374 | if (gpsdata->fix.status == STATUS_NO_FIX) {
+ | ^~~~~~~~~~~~~
+ | STATUS_PPS_FIX
+
+Fixes:
+ - http://autobuild.buildroot.org/results/53b06e72fb2d8b4c8b6ba41baf775ff33654cd18
+
+[Fixed-Commit-Message by: Nick Hainke <vincent at systemli.org>]
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice at gmail.com>
+[Upstream: https://github.com/OLSR/olsrd/commit/69ae23be9f96b9e7dd68a0252f3ad05986bb222d]
+Signed-off-by: Peter Seiderer <ps.report at gmx.net>
+---
+ lib/pud/src/gpsdclient.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/lib/pud/src/gpsdclient.c b/lib/pud/src/gpsdclient.c
+index a2a9cee0..9c98f4df 100644
+--- a/lib/pud/src/gpsdclient.c
++++ b/lib/pud/src/gpsdclient.c
+@@ -370,7 +370,9 @@ void nmeaInfoFromGpsd(struct gps_data_t *gpsdata, NmeaInfo *info, struct GpsdCon
+ );
+
+ gpsdata->set &= ~STATUS_SET; /* always valid */
+- #if GPSD_API_MAJOR_VERSION >= 10
++ #if GPSD_API_MAJOR_VERSION >= 12
++ if (gpsdata->fix.status == STATUS_UNK) {
++ #elif GPSD_API_MAJOR_VERSION >= 10
+ if (gpsdata->fix.status == STATUS_NO_FIX) {
+ #else
+ if (gpsdata->status == STATUS_NO_FIX) {
+--
+2.33.1
+
--
2.33.1
More information about the buildroot
mailing list