File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change 5757// Debian bug report: direwolf (1.2-1) FTBFS with libgps22 as part of the gpsd transition (#803605):
5858// dwgps.c claims to only support GPSD_API_MAJOR_VERSION 5, but also builds successfully with
5959// GPSD_API_MAJOR_VERSION 6 provided by libgps22 when the attached patch is applied.
60- #if GPSD_API_MAJOR_VERSION < 5 || GPSD_API_MAJOR_VERSION > 6
60+
61+ // Also compatible with API 7 with conditional compilation later.
62+
63+ #if GPSD_API_MAJOR_VERSION < 5 || GPSD_API_MAJOR_VERSION > 7
6164#error libgps API version might be incompatible.
6265#endif
6366
@@ -257,7 +260,19 @@ static void * read_gpsd_thread (void *arg)
257260 /* Fall thru to read which should get error and bail out. */
258261 }
259262
263+ // https://github.com/wb2osz/direwolf/issues/196
264+ // https://bugzilla.redhat.com/show_bug.cgi?id=1674812
265+
266+ // gps_read has two new parameters in API version 7.
267+ // It looks like this could be used to obtain the JSON message from the daemon.
268+ // Specify NULL, instead of message buffer space, if this is not desired.
269+ // Why couldn't they add a new function instead of introducing incompatibility?
270+
271+ #if GPSD_API_MAJOR_VERSION >= 7
272+ if (gps_read (& gpsdata , NULL , 0 ) == -1 ) {
273+ #else
260274 if (gps_read (& gpsdata ) == -1 ) {
275+ #endif
261276 text_color_set (DW_COLOR_ERROR );
262277
263278 dw_printf ("------------------------------------------\n" );
You can’t perform that action at this time.
0 commit comments