-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
uhd: tweak gpsd patch to work more robustly
- Loading branch information
Showing
1 changed file
with
5 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"); | ||
} | } | ||
} | } |