Skip to contentSkip to conversation

package/olsr: add upstream patch to fix compile with gpsd-3.23.1

PATCH Superseded Peter Seiderer 2 participants 4 messages Nov 6, 2021

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/olsr: add upstream patch to fix compile with gpsd-3.23.1

- 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

---
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
package/olsr/0005-pud-fix-build-with-gpsd-3.23.1.patch new file +44 -0
new file mode 100644
index 0000000000..a8d53482b9
@@ -0,0 +1,44 @@
+From 69ae23be9f96b9e7dd68a0252f3ad05986bb222d Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <[email protected]>
+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 <[email protected]>]
+
+Signed-off-by: Fabrice Fontaine <[email protected]>
+[Upstream: https://github.com/OLSR/olsrd/commit/69ae23be9f96b9e7dd68a0252f3ad05986bb222d]
+Signed-off-by: Peter Seiderer <[email protected]>
+---
+ 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
+
Signature · 6 lines
2.33.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

Hi,

Quoted 14 lines · Peter Seiderer

- 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
Quoted 8 lines

[1] https://github.com/OLSR/olsrd/commit/69ae23be9f96b9e7dd68a0252f3ad05986bb222d

---
Notes:

- @Fabrice: did not find a corresponding buildroot patch from you, did you sent one and I missed it?

Nope, I didn't send a patch as I wasn't sure that this commit was correct after all: https://github.com/OLSR/olsrd/pull/107
Indeed, from my understanding of the gpsd maintainer, this commit will fix the build failure but the code before and after this patch is broken.
A better approach would be to use gpsdata->fix.mode instead of gpsdata->fix.status:
https://github.com/swri-robotics/gps_umd/issues/50.
I'll send a PR to get feedback from upstream.

Quoted 56 lines
---
 .../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
package/olsr/0005-pud-fix-build-with-gpsd-3.23.1.patch new file +44 -1
new file mode 100644
index 0000000000..a8d53482b9
@@ -0,0 +1,44 @@
+From 69ae23be9f96b9e7dd68a0252f3ad05986bb222d Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <[email protected]>
+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 <[email protected]>]
+
+Signed-off-by: Fabrice Fontaine <[email protected]>
+[Upstream: https://github.com/OLSR/olsrd/commit/69ae23be9f96b9e7dd68a0252f3ad05986bb222d]
+Signed-off-by: Peter Seiderer <[email protected]>
+---
+ 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
+
--
Quoted 2 lines

2.33.1

Best Regards,

Fabrice
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#2 lore raw
Quoted 26 lines · Fabrice Fontaine

Hi,

Quoted 14 lines · Peter Seiderer

- 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
Quoted 8 lines

[1] https://github.com/OLSR/olsrd/commit/69ae23be9f96b9e7dd68a0252f3ad05986bb222d

---
Notes:

- @Fabrice: did not find a corresponding buildroot patch from you, did you sent one and I missed it?

Quoted 9 lines

Nope, I didn't send a patch as I wasn't sure that this commit was correct after all: https://github.com/OLSR/olsrd/pull/107
Indeed, from my understanding of the gpsd maintainer, this commit will fix the build failure but the code before and after this patch is broken.
A better approach would be to use gpsdata->fix.mode instead of gpsdata->fix.status:
https://github.com/swri-robotics/gps_umd/issues/50.
I'll send a PR to get feedback from upstream.

Patch has been merged upstream:
https://github.com/OLSR/olsrd/commit/665051a845464c0f95edb81432104dac39426f79
Feel free to send a v2.

Quoted 60 lines
Quoted 56 lines
---
 .../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
package/olsr/0005-pud-fix-build-with-gpsd-3.23.1.patch new file +44 -1
new file mode 100644
index 0000000000..a8d53482b9
@@ -0,0 +1,44 @@
+From 69ae23be9f96b9e7dd68a0252f3ad05986bb222d Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <[email protected]>
+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 <[email protected]>]
+
+Signed-off-by: Fabrice Fontaine <[email protected]>
+[Upstream: https://github.com/OLSR/olsrd/commit/69ae23be9f96b9e7dd68a0252f3ad05986bb222d]
+Signed-off-by: Peter Seiderer <[email protected]>
+---
+ 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
+
--
Quoted 2 lines

2.33.1

Best Regards,

Quoted 1 line

Fabrice

Best Regards,

Fabrice
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#3 lore raw

Hello Fabrice,

Quoted 37 lines · Fabrice Fontaine
Quoted 26 lines · Fabrice Fontaine

Hi,

Quoted 14 lines · Peter Seiderer

- 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
Quoted 8 lines

[1] https://github.com/OLSR/olsrd/commit/69ae23be9f96b9e7dd68a0252f3ad05986bb222d

---
Notes:

- @Fabrice: did not find a corresponding buildroot patch from you, did you sent one and I missed it?

Quoted 9 lines

Nope, I didn't send a patch as I wasn't sure that this commit was correct after all: https://github.com/OLSR/olsrd/pull/107
Indeed, from my understanding of the gpsd maintainer, this commit will fix the build failure but the code before and after this patch is broken.
A better approach would be to use gpsdata->fix.mode instead of gpsdata->fix.status:
https://github.com/swri-robotics/gps_umd/issues/50.
I'll send a PR to get feedback from upstream.

Quoted 3 lines

Patch has been merged upstream:
https://github.com/OLSR/olsrd/commit/665051a845464c0f95edb81432104dac39426f79
Feel free to send a v2.

Done:

	https://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/

Thanks for providing the upstream patch and discussion ;-)

Regards,
Peter

Quoted 60 lines
Quoted 60 lines
Quoted 56 lines
---
 .../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
package/olsr/0005-pud-fix-build-with-gpsd-3.23.1.patch new file +44 -1
new file mode 100644
index 0000000000..a8d53482b9
@@ -0,0 +1,44 @@
+From 69ae23be9f96b9e7dd68a0252f3ad05986bb222d Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <[email protected]>
+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 <[email protected]>]
+
+Signed-off-by: Fabrice Fontaine <[email protected]>
+[Upstream: https://github.com/OLSR/olsrd/commit/69ae23be9f96b9e7dd68a0252f3ad05986bb222d]
+Signed-off-by: Peter Seiderer <[email protected]>
+---
+ 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
+
--
Quoted 2 lines

2.33.1

Best Regards,

Quoted 8 lines
Quoted 1 line

Fabrice

Best Regards,

Fabrice
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot