summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Crispin2018-02-12 14:40:37 +0000
committerJohn Crispin2018-02-12 14:40:37 +0000
commitcdc1478a8133bec40cdf2daf05640c22e6126aa0 (patch)
treed092c9259858960c2d671a3a761ff636c6dec27d
parent928cb537aa6a1951ff503b4d13f3c78cead7b581 (diff)
downloadugps-cdc1478a8133bec40cdf2daf05640c22e6126aa0.tar.gz
remove deprication warning
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>
-rw-r--r--nmea.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/nmea.c b/nmea.c
index 1a3f94f..73ee722 100644
--- 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);