Path: blob/main/comms/direwolf/files/patch-dwgpsd.c
16124 views
--- dwgpsd.c.orig 2020-03-05 16:59:08 UTC1+++ dwgpsd.c2@@ -57,7 +57,10 @@3// Debian bug report: direwolf (1.2-1) FTBFS with libgps22 as part of the gpsd transition (#803605):4// dwgps.c claims to only support GPSD_API_MAJOR_VERSION 5, but also builds successfully with5// GPSD_API_MAJOR_VERSION 6 provided by libgps22 when the attached patch is applied.6-#if GPSD_API_MAJOR_VERSION < 5 || GPSD_API_MAJOR_VERSION > 67+8+// Also compatible with API 9 with conditional compilation later.9+10+#if GPSD_API_MAJOR_VERSION < 5 || GPSD_API_MAJOR_VERSION > 911#error libgps API version might be incompatible.12#endif1314@@ -257,7 +260,19 @@ static void * read_gpsd_thread (void *arg)15/* Fall thru to read which should get error and bail out. */16}1718+// https://github.com/wb2osz/direwolf/issues/19619+// https://bugzilla.redhat.com/show_bug.cgi?id=167481220+21+// gps_read has two new parameters in API version 7.22+// It looks like this could be used to obtain the JSON message from the daemon.23+// Specify NULL, instead of message buffer space, if this is not desired.24+// Why couldn't they add a new function instead of introducing incompatibility?25+26+#if GPSD_API_MAJOR_VERSION >= 727+ if (gps_read (&gpsdata, NULL, 0) == -1) {28+#else29if (gps_read (&gpsdata) == -1) {30+#endif31text_color_set(DW_COLOR_ERROR);3233dw_printf ("------------------------------------------\n");343536