Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v1] package/olsr: add upstream patch to fix compile with gpsd-3.23.1
@ 2021-11-06 11:28 Peter Seiderer
  2021-11-06 14:09 ` Fabrice Fontaine
  0 siblings, 1 reply; 4+ messages in thread
From: Peter Seiderer @ 2021-11-06 11:28 UTC (permalink / raw)
  To: buildroot; +Cc: Fabrice Fontaine

- 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@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@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@systemli.org>]
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+[Upstream: https://github.com/OLSR/olsrd/commit/69ae23be9f96b9e7dd68a0252f3ad05986bb222d]
+Signed-off-by: Peter Seiderer <ps.report@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

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-11-06 18:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-06 11:28 [Buildroot] [PATCH v1] package/olsr: add upstream patch to fix compile with gpsd-3.23.1 Peter Seiderer
2021-11-06 14:09 ` Fabrice Fontaine
2021-11-06 15:15   ` Fabrice Fontaine
2021-11-06 18:22     ` Peter Seiderer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox