All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2] package/olsr: add upstream patch to fix compile with gpsd-3.23.1
@ 2021-11-06 18:09 Peter Seiderer
  2021-11-07 20:30 ` Peter Korsgaard
  2021-11-09  9:58 ` Peter Korsgaard
  0 siblings, 2 replies; 3+ messages in thread
From: Peter Seiderer @ 2021-11-06 18:09 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/665051a845464c0f95edb81432104dac39426f79

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
---
Changes v1 -> v2:

  - previous upstream patch was (after some discussion) reverted and
    replaced with the now provided one
---
 ...client.c-drop-handling-of-gpsdata-fi.patch | 49 +++++++++++++++++++
 1 file changed, 49 insertions(+)
 create mode 100644 package/olsr/0005-lib-pud-src-gpsdclient.c-drop-handling-of-gpsdata-fi.patch

diff --git a/package/olsr/0005-lib-pud-src-gpsdclient.c-drop-handling-of-gpsdata-fi.patch b/package/olsr/0005-lib-pud-src-gpsdclient.c-drop-handling-of-gpsdata-fi.patch
new file mode 100644
index 0000000000..7ea3fbadd7
--- /dev/null
+++ b/package/olsr/0005-lib-pud-src-gpsdclient.c-drop-handling-of-gpsdata-fi.patch
@@ -0,0 +1,49 @@
+From 665051a845464c0f95edb81432104dac39426f79 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date: Sat, 6 Nov 2021 15:50:58 +0100
+Subject: [PATCH] lib/pud/src/gpsdclient.c: drop handling of
+ gpsdata->fix.status
+
+Here is an extract of https://gpsd.gitlab.io/gpsd/gpsd_json.html:
+
+The optional "status" field (aka fix type), is a modifier (adjective) to
+mode. It is not a replacement for, or superset of, the "mode" field. It
+is almost, but not quite, the same as the NMEA 4.x xxGGA GPS Quality
+Indicator Values. Many GNSS receivers do not supply it. Those that do
+interpret the specification in various incompatible ways.
+
+So status field is optional and STATUS_NO_FIX has been explicitly
+renamed into STATUS_UNK to avoid confusion with MODE_NO_FIX (which is
+already handled by gpsdclient.c) so drop the if block to fix the build
+failure with gpsd >= 3.23.1.
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+[Upstream: https://github.com/OLSR/olsrd/commit/665051a845464c0f95edb81432104dac39426f79]
+Signed-off-by: Peter Seiderer <ps.report@gmx.net>
+---
+ lib/pud/src/gpsdclient.c | 9 ---------
+ 1 file changed, 9 deletions(-)
+
+diff --git a/lib/pud/src/gpsdclient.c b/lib/pud/src/gpsdclient.c
+index a2a9cee0..d448867d 100644
+--- a/lib/pud/src/gpsdclient.c
++++ b/lib/pud/src/gpsdclient.c
+@@ -370,15 +370,6 @@ void nmeaInfoFromGpsd(struct gps_data_t *gpsdata, NmeaInfo *info, struct GpsdCon
+           );
+ 
+   gpsdata->set &= ~STATUS_SET; /* always valid */
+-  #if GPSD_API_MAJOR_VERSION >= 10
+-  if (gpsdata->fix.status == STATUS_NO_FIX) {
+-  #else
+-  if (gpsdata->status == STATUS_NO_FIX) {
+-  #endif
+-    nmeaInfoClear(info);
+-    nmeaTimeSet(&info->utc, &info->present, NULL);
+-    return;
+-  }
+ 
+   if (!gpsdata->set) {
+     return;
+-- 
+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] 3+ messages in thread

* Re: [Buildroot] [PATCH v2] package/olsr: add upstream patch to fix compile with gpsd-3.23.1
  2021-11-06 18:09 [Buildroot] [PATCH v2] package/olsr: add upstream patch to fix compile with gpsd-3.23.1 Peter Seiderer
@ 2021-11-07 20:30 ` Peter Korsgaard
  2021-11-09  9:58 ` Peter Korsgaard
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2021-11-07 20:30 UTC (permalink / raw)
  To: Peter Seiderer; +Cc: Fabrice Fontaine, buildroot

>>>>> "Peter" == Peter Seiderer <ps.report@gmx.net> writes:

 > - 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/665051a845464c0f95edb81432104dac39426f79

 > Signed-off-by: Peter Seiderer <ps.report@gmx.net>
 > ---
 > Changes v1 -> v2:

 >   - previous upstream patch was (after some discussion) reverted and
 >     replaced with the now provided one

Committed, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH v2] package/olsr: add upstream patch to fix compile with gpsd-3.23.1
  2021-11-06 18:09 [Buildroot] [PATCH v2] package/olsr: add upstream patch to fix compile with gpsd-3.23.1 Peter Seiderer
  2021-11-07 20:30 ` Peter Korsgaard
@ 2021-11-09  9:58 ` Peter Korsgaard
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2021-11-09  9:58 UTC (permalink / raw)
  To: Peter Seiderer; +Cc: Fabrice Fontaine, buildroot

>>>>> "Peter" == Peter Seiderer <ps.report@gmx.net> writes:

 > - 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/665051a845464c0f95edb81432104dac39426f79

 > Signed-off-by: Peter Seiderer <ps.report@gmx.net>
 > ---
 > Changes v1 -> v2:

 >   - previous upstream patch was (after some discussion) reverted and
 >     replaced with the now provided one

Committed to 2021.02.x and 2021.08.x, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2021-11-09  9:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-06 18:09 [Buildroot] [PATCH v2] package/olsr: add upstream patch to fix compile with gpsd-3.23.1 Peter Seiderer
2021-11-07 20:30 ` Peter Korsgaard
2021-11-09  9:58 ` Peter Korsgaard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.