This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Pau Espin Pedrol gerrit-no-reply at lists.osmocom.orgPau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/11505
Change subject: {oc2g,sysmo}-mgr-calib: Fix build against gpsd >= 3.18
......................................................................
{oc2g,sysmo}-mgr-calib: Fix build against gpsd >= 3.18
Change-Id: I1f9176432b3a01bd5e8c179dc269e391df2d446f
---
M src/osmo-bts-oc2g/misc/oc2gbts_mgr_calib.c
M src/osmo-bts-sysmo/misc/sysmobts_mgr_calib.c
2 files changed, 22 insertions(+), 3 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/05/11505/1
diff --git a/src/osmo-bts-oc2g/misc/oc2gbts_mgr_calib.c b/src/osmo-bts-oc2g/misc/oc2gbts_mgr_calib.c
index 9616262..104d279 100644
--- a/src/osmo-bts-oc2g/misc/oc2gbts_mgr_calib.c
+++ b/src/osmo-bts-oc2g/misc/oc2gbts_mgr_calib.c
@@ -69,6 +69,16 @@
CALIB_SUCCESS,
};
+static inline int compat_gps_read(struct gps_data_t *data)
+{
+/* API break in gpsd 6bba8b329fc7687b15863d30471d5af402467802 */
+#if GPSD_API_MAJOR_VERSION >= 7 && GPSD_API_MINOR_VERSION >= 0
+ return gps_read(data, NULL, 0);
+#else
+ return gps_read(data);
+#endif
+}
+
static int oc2gbts_par_get_uptime(void *ctx, int *ret)
{
char *fpath;
@@ -173,7 +183,7 @@
int rc;
struct oc2gbts_mgr_instance *mgr = fd->data;
- rc = gps_read(&mgr->gps.gpsdata);
+ rc = compat_gps_read(&mgr->gps.gpsdata);
if (rc == -1) {
LOGP(DCALIB, LOGL_ERROR, "gpsd vanished during read.\n");
calib_state_reset(mgr, CALIB_FAIL_GPSFIX);
diff --git a/src/osmo-bts-sysmo/misc/sysmobts_mgr_calib.c b/src/osmo-bts-sysmo/misc/sysmobts_mgr_calib.c
index 62509f2..b0b5edd 100644
--- a/src/osmo-bts-sysmo/misc/sysmobts_mgr_calib.c
+++ b/src/osmo-bts-sysmo/misc/sysmobts_mgr_calib.c
@@ -57,6 +57,16 @@
CALIB_SUCESS,
};
+static inline int compat_gps_read(struct gps_data_t *data)
+{
+/* API break in gpsd 6bba8b329fc7687b15863d30471d5af402467802 */
+#if GPSD_API_MAJOR_VERSION >= 7 && GPSD_API_MINOR_VERSION >= 0
+ return gps_read(data, NULL, 0);
+#else
+ return gps_read(data);
+#endif
+}
+
static void calib_loop_run(void *_data)
{
int rc;
@@ -109,8 +119,7 @@
{
int rc;
struct sysmobts_mgr_instance *mgr = fd->data;
-
- rc = gps_read(&mgr->calib.gpsdata);
+ rc = compat_gps_read(&mgr->calib.gpsdata);
if (rc == -1) {
LOGP(DCALIB, LOGL_ERROR, "gpsd vanished during read.\n");
calib_state_reset(mgr, CALIB_FAIL_GPS);
--
To view, visit https://gerrit.osmocom.org/11505
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1f9176432b3a01bd5e8c179dc269e391df2d446f
Gerrit-Change-Number: 11505
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181029/2126a149/attachment.htm>