Skip to content

Commit

Permalink
uhd: tweak gpsd patch to work more robustly
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelld committed Jun 29, 2019
1 parent cd5d6a1 commit cb42dbd
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions science/uhd/files/patch-fix-gpsd_read-api.diff
Original file line number Original file line Diff line number Diff line change
@@ -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 --- a/host/lib/usrp/gpsd_iface.cpp
+++ b/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; _timeout_cnt = 0;
_detected = true; _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) + if (gps_read(&_gps_data, NULL, 0) < 0)
+#endif
throw std::runtime_error("error while reading"); throw std::runtime_error("error while reading");
} }
} }

0 comments on commit cb42dbd

Please sign in to comment.