[meta-oe,warrior] gpsd: Fix shared memory function gps_waiting() failing indefinitely

Submitted by Adrian Bunk on Oct. 31, 2019, 4:54 p.m. | Patch ID: 166454

Details

Message ID 20191031165412.24745-3-bunk@stusta.de
State Under Review
Delegated to: Armin Kuster
Headers show

Commit Message

Adrian Bunk Oct. 31, 2019, 4:54 p.m.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
---
Already fixed in gpsd 3.19 in zeus and master.
---
 ...-bug-53846-gps_shm_open-should-reset.patch | 28 +++++++++++++++++++
 meta-oe/recipes-navigation/gpsd/gpsd_3.17.bb  |  1 +
 2 files changed, 29 insertions(+)
 create mode 100644 meta-oe/recipes-navigation/gpsd/gpsd-3.17/0001-Address-Savannah-bug-53846-gps_shm_open-should-reset.patch

Patch hide | download patch | download mbox

diff --git a/meta-oe/recipes-navigation/gpsd/gpsd-3.17/0001-Address-Savannah-bug-53846-gps_shm_open-should-reset.patch b/meta-oe/recipes-navigation/gpsd/gpsd-3.17/0001-Address-Savannah-bug-53846-gps_shm_open-should-reset.patch
new file mode 100644
index 000000000..33b251e3a
--- /dev/null
+++ b/meta-oe/recipes-navigation/gpsd/gpsd-3.17/0001-Address-Savannah-bug-53846-gps_shm_open-should-reset.patch
@@ -0,0 +1,28 @@ 
+From 20e7553d8e7e716e8365958e75957216dd41cd4d Mon Sep 17 00:00:00 2001
+From: "Eric S. Raymond" <esr@thyrsus.com>
+Date: Wed, 26 Dec 2018 09:23:57 -0500
+Subject: Address Savannah bug #53846, gps_shm_open() should
+ reset...PRIVATE(gpsdata)->tick
+
+Upstream-Status: Backport
+Signed-off-by: Adrian Bunk <bunk@stusta.de>
+
+---
+ libgps_shm.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/libgps_shm.c b/libgps_shm.c
+index 755f63c73..8510c0f1c 100644
+--- a/libgps_shm.c
++++ b/libgps_shm.c
+@@ -59,6 +59,7 @@ int gps_shm_open(struct gps_data_t *gpsdata)
+     if (gpsdata->privdata == NULL)
+ 	return -1;
+ 
++    PRIVATE(gpsdata)->tick = 0;
+     PRIVATE(gpsdata)->shmseg = shmat(shmid, 0, 0);
+     if (PRIVATE(gpsdata)->shmseg == (void *) -1) {
+ 	/* attach failed for sume unknown reason */
+-- 
+2.20.1
+
diff --git a/meta-oe/recipes-navigation/gpsd/gpsd_3.17.bb b/meta-oe/recipes-navigation/gpsd/gpsd_3.17.bb
index f4e018055..deafe0d64 100644
--- a/meta-oe/recipes-navigation/gpsd/gpsd_3.17.bb
+++ b/meta-oe/recipes-navigation/gpsd/gpsd_3.17.bb
@@ -13,6 +13,7 @@  SRC_URI = "${SAVANNAH_GNU_MIRROR}/${BPN}/${BP}.tar.gz \
     file://0001-include-sys-ttydefaults.h.patch \
     file://0001-Add-bounds-check-in-in_escape-state-of-JSON-parser.patch \
     file://0001-gps_shm_close-Free-privdata.patch \
+    file://0001-Address-Savannah-bug-53846-gps_shm_open-should-reset.patch \
 "
 SRC_URI[md5sum] = "e0cfadcf4a65dfbdd2afb11c58f4e4a1"
 SRC_URI[sha256sum] = "68e0dbecfb5831997f8b3d6ba48aed812eb465d8c0089420ab68f9ce4d85e77a"