Skip to content
Permalink
Browse files

uhd: tweak gpsd patch to work more robustly

  • Loading branch information
michaelld committed Jun 29, 2019
1 parent cd5d6a1 commit cb42dbd18969c7ff5fdaa0bb30e02b47a3048824
Showing with 5 additions and 4 deletions.
  1. +5 −4 science/uhd/files/patch-fix-gpsd_read-api.diff
@@ -1,13 +1,14 @@
diff --git a/host/lib/usrp/gpsd_iface.cpp b/host/lib/usrp/gpsd_iface.cpp
index b34132f..b439a80 100644
--- a/host/lib/usrp/gpsd_iface.cpp
+++ b/host/lib/usrp/gpsd_iface.cpp
@@ -119,7 +119,7 @@ private: // member functions
@@ -119,7 +119,11 @@
_timeout_cnt = 0;
_detected = true;

- if (gps_read(&_gps_data) < 0)
+#if GPSD_API_MAJOR_VERSION < 7
if (gps_read(&_gps_data) < 0)
+#else
+ if (gps_read(&_gps_data, NULL, 0) < 0)
+#endif
throw std::runtime_error("error while reading");
}
}

0 comments on commit cb42dbd

Please sign in to comment.
You can’t perform that action at this time.