kumquat-buildroot/package/gpsd/0003-driver_ubx-Save-UBX-RXM-RAWX-data-in-rawdate_t.patch
Fabrice Fontaine 9386d72e74 package/gpsd: bump to version 3.18.1
- Remove second patch (already in version)
- Add a patch to fix build without man pages
- Add a patch to remove C99-style loop

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Reviewed-by: Benoît Thébaudeau <benoit.thebaudeau.dev@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2019-05-26 15:03:39 +02:00

39 lines
1.4 KiB
Diff

From d685ab05952d7eadf012fc054032f0190cf2abda Mon Sep 17 00:00:00 2001
From: "Gary E. Miller" <gem@rellim.com>
Date: Fri, 26 Oct 2018 10:12:40 -0700
Subject: driver_ubx: Save UBX-RXM-RAWX data in rawdate_t.
A step in getting u-blox 8 raw data into the new RAW JSON message.
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
[Retrieved (and backported to keep only C99-style loop fix) from:
https://git.savannah.gnu.org/cgit/gpsd.git/commit/driver_ubx.c?id=d685ab05952d7eadf012fc054032f0190cf2abda]
---
driver_ubx.c | 29 ++++++++++++++++++++++++++---
1 file changed, 26 insertions(+), 3 deletions(-)
diff --git a/driver_ubx.c b/driver_ubx.c
index 585b2b9..0dccddf 100644
--- a/driver_ubx.c
+++ b/driver_ubx.c
@@ -813,6 +813,7 @@ static gps_mask_t ubx_rxm_rawx(struct gps_device_t *session,
int8_t leapS;
uint8_t numMeas;
uint8_t recStat;
+ int i;
if (16 > data_len) {
gpsd_log(&session->context->errout, LOG_WARN,
@@ -830,6 +831,6 @@ static gps_mask_t ubx_rxm_rawx(struct gps_device_t *session,
"UBX_RXM_RAWX: rcvTow %f week %u leapS %d numMeas %u recStat %d\n",
rcvTow, week, leapS, numMeas, recStat);
- for (int i = 0; i < numMeas; i++) {
+ for (i = 0; i < numMeas; i++) {
int off = 32 * i;
double prMes = getled64((const char *)buf, off + 16);
double cpMes = getled64((const char *)buf, off + 24);
--
cgit v1.0-41-gc330