remove deprication warning
authorJohn Crispin <john@phrozen.org>
Mon, 12 Feb 2018 14:40:37 +0000 (15:40 +0100)
committerJohn Crispin <john@phrozen.org>
Mon, 12 Feb 2018 14:40:37 +0000 (15:40 +0100)
In file included from /usr/include/time.h:27:0,
from /src/projects/ugps/nmea.c:21:
/usr/include/features.h:148:3: error: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Werror=cpp]

Signed-off-by: John Crispin <john@phrozen.org>
nmea.c

diff --git a/nmea.c b/nmea.c
index 1a3f94f5b6347a3d57a45b99cac76dcaf991434a..73ee722dfb7ee3ad0b3c49f79be67a9e565e36d5 100644 (file)
--- a/nmea.c
+++ b/nmea.c
@@ -16,7 +16,7 @@
  *   Copyright (C) 2014 John Crispin <blogic@openwrt.org> 
  */
 
-#define _BSD_SOURCE
+#define _DEFAULT_SOURCE
 #define _XOPEN_SOURCE
 #include <time.h>
 
@@ -134,7 +134,7 @@ nmea_rmc_cb(void)
                if (*nmea_params[4].str == 'S')
                        lat *= -1.0;
                if (*nmea_params[6].str == 'W')
-                       lon *= -1.0;            
+                       lon *= -1.0;
 
                snprintf(latitude, sizeof(latitude), "%f", lat);
                snprintf(longitude, sizeof(longitude), "%f", lon);