From: John Crispin Date: Mon, 12 Feb 2018 14:40:37 +0000 (+0100) Subject: remove deprication warning X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fugps.git;a=commitdiff_plain 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 --- 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 */ -#define _BSD_SOURCE +#define _DEFAULT_SOURCE #define _XOPEN_SOURCE #include @@ -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);