From ddd0330fe1360de5843f72306d2c766e3b4e6124 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Sat, 31 Jul 2021 23:50:00 +0200 Subject: [PATCH] package/olsr: backport upstream patch to fix compat with gpsd 3.21 Since the update of gpsd to 3.21, olsr was failing to build with: src/gpsdclient.c: In function 'nmeaInfoFromGpsd': src/gpsdclient.c:373:14: error: 'struct gps_data_t' has no member named 'status' 373 | if (gpsdata->status == STATUS_NO_FIX) { | ^~ This is due to an API change in gpsd. This commit fixes that by backporting an upstream commit from olsr. Fixes: http://autobuild.buildroot.net/results/d8c5564b24ff5b646cdd786d07b3a45ce5fa01ea/ Signed-off-by: Thomas Petazzoni --- ...-adapt-gpsdclient.c-to-new-gpsd-3.21.patch | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 package/olsr/0004-pud-adapt-gpsdclient.c-to-new-gpsd-3.21.patch diff --git a/package/olsr/0004-pud-adapt-gpsdclient.c-to-new-gpsd-3.21.patch b/package/olsr/0004-pud-adapt-gpsdclient.c-to-new-gpsd-3.21.patch new file mode 100644 index 0000000000..8001343941 --- /dev/null +++ b/package/olsr/0004-pud-adapt-gpsdclient.c-to-new-gpsd-3.21.patch @@ -0,0 +1,35 @@ +From 2f9ee6079b20fb5d3884472825a40c5c65550fa2 Mon Sep 17 00:00:00 2001 +From: Nick Hainke +Date: Sun, 30 May 2021 19:13:48 +0200 +Subject: [PATCH] pud: adapt gpsdclient.c to new gpsd 3.21 + +As mentioned: +"Move gps_data_t->status to gps_fix_t.status for better fix merging" +https://gitlab.com/gpsd/gpsd/-/commit/29991d6ffeb41ecfc8297db68bb68be0128c8514 + +Signed-off-by: Nick Hainke +Upstream: 79a28cdb4083b66c5d3a5f9c0d70dbdc86c0420c +Signed-off-by: Thomas Petazzoni +--- + lib/pud/src/gpsdclient.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/lib/pud/src/gpsdclient.c b/lib/pud/src/gpsdclient.c +index 2a7a26ee..a2a9cee0 100644 +--- a/lib/pud/src/gpsdclient.c ++++ b/lib/pud/src/gpsdclient.c +@@ -370,7 +370,11 @@ 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; +-- +2.31.1 + -- 2.30.2