1From 665051a845464c0f95edb81432104dac39426f79 Mon Sep 17 00:00:00 2001
2From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
3Date: Sat, 6 Nov 2021 15:50:58 +0100
4Subject: [PATCH] lib/pud/src/gpsdclient.c: drop handling of
5 gpsdata->fix.status
6
7Here is an extract of https://gpsd.gitlab.io/gpsd/gpsd_json.html:
8
9The optional "status" field (aka fix type), is a modifier (adjective) to
10mode. It is not a replacement for, or superset of, the "mode" field. It
11is almost, but not quite, the same as the NMEA 4.x xxGGA GPS Quality
12Indicator Values. Many GNSS receivers do not supply it. Those that do
13interpret the specification in various incompatible ways.
14
15So status field is optional and STATUS_NO_FIX has been explicitly
16renamed into STATUS_UNK to avoid confusion with MODE_NO_FIX (which is
17already handled by gpsdclient.c) so drop the if block to fix the build
18failure with gpsd >= 3.23.1.
19
20Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
21[Upstream: https://github.com/OLSR/olsrd/commit/665051a845464c0f95edb81432104dac39426f79]
22Signed-off-by: Peter Seiderer <ps.report@gmx.net>
23---
24 lib/pud/src/gpsdclient.c | 9 ---------
25 1 file changed, 9 deletions(-)
26
27diff --git a/lib/pud/src/gpsdclient.c b/lib/pud/src/gpsdclient.c
28index a2a9cee0..d448867d 100644
29--- a/lib/pud/src/gpsdclient.c
30+++ b/lib/pud/src/gpsdclient.c
31@@ -370,15 +370,6 @@ void nmeaInfoFromGpsd(struct gps_data_t *gpsdata, NmeaInfo *info, struct GpsdCon
32           );
33
34   gpsdata->set &= ~STATUS_SET; /* always valid */
35-  #if GPSD_API_MAJOR_VERSION >= 10
36-  if (gpsdata->fix.status == STATUS_NO_FIX) {
37-  #else
38-  if (gpsdata->status == STATUS_NO_FIX) {
39-  #endif
40-    nmeaInfoClear(info);
41-    nmeaTimeSet(&info->utc, &info->present, NULL);
42-    return;
43-  }
44
45   if (!gpsdata->set) {
46     return;
47--
482.33.1
49
50