aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOliver Smith <osmith@sysmocom.de>2022-12-19 13:30:02 +0100
committerosmith <osmith@sysmocom.de>2022-12-21 10:43:48 +0000
commit73773447715c57075ad5acb96a5346ff23d7e91f (patch)
treeaf8db454db542d00831db41741c0f5cf94e42578
parentc8e2b021a9f41008c168cca4160102b58f00d842 (diff)
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
-rw-r--r--src/osmo-bts-oc2g/misc/oc2gbts_mgr_calib.c5
1 files 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 f66761af..9da22f46 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 @@ static void mgr_gps_checkfix(struct oc2gbts_mgr_instance *mgr)
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);