osmith submitted this change.
oc2gbts_mgr_calib: fix build against gpsd >= 3.20
Fixes: OS#5832
Related: https://gitlab.com/gpsd/gpsd/-/blob/release-3.20/gps.h#L63
Change-Id: I6dc8ce303e5cb0fb412857a7f2c925e8cfe9b1e0
---
M src/osmo-bts-oc2g/misc/oc2gbts_mgr_calib.c
1 file changed, 5 insertions(+), 0 deletions(-)
diff --git a/src/osmo-bts-oc2g/misc/oc2gbts_mgr_calib.c b/src/osmo-bts-oc2g/misc/oc2gbts_mgr_calib.c
index f66761a..9da22f4 100644
--- a/src/osmo-bts-oc2g/misc/oc2gbts_mgr_calib.c
+++ b/src/osmo-bts-oc2g/misc/oc2gbts_mgr_calib.c
@@ -171,7 +171,12 @@
return;
}
+#if GPSD_API_MAJOR_VERSION >= 9
+ mgr->gps.gps_fix_now = data->fix.time.tv_sec;
+#else
mgr->gps.gps_fix_now = (time_t) data->fix.time;
+#endif
+
LOGP(DCALIB, LOGL_INFO, "Got a GPS fix, satellites used: %d, timestamp: %ld\n",
data->satellites_used, mgr->gps.gps_fix_now);
osmo_timer_del(&mgr->gps.fix_timeout);
To view, visit change 30638. To unsubscribe, or for help writing mail filters, visit settings.