gpsd: Add missing define
authorRosen Penev <rosenp@gmail.com>
Sat, 6 Jul 2019 22:43:09 +0000 (15:43 -0700)
committerRosen Penev <rosenp@gmail.com>
Sat, 6 Jul 2019 23:42:44 +0000 (16:42 -0700)
musl needs _BSD_SOURCE defined for strlcat/cpy

Signed-off-by: Rosen Penev <rosenp@gmail.com>
utils/gpsd/Makefile
utils/gpsd/patches/010-musl.patch [new file with mode: 0644]

index 4272034128da29746f156e2ab9b93be8717774b4..dd9d9a9d52db25d80ba56b1e7e83c4a759b66c59 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=gpsd
 PKG_VERSION:=3.17
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SAVANNAH/$(PKG_NAME)
diff --git a/utils/gpsd/patches/010-musl.patch b/utils/gpsd/patches/010-musl.patch
new file mode 100644 (file)
index 0000000..a2ba951
--- /dev/null
@@ -0,0 +1,40 @@
+--- a/driver_ais.c
++++ b/driver_ais.c
+@@ -24,6 +24,7 @@
+ /* strlcpy() needs _DARWIN_C_SOURCE */
+ #define _DARWIN_C_SOURCE
++#define _BSD_SOURCE
+ #include <stdlib.h>
+ #include <string.h>
+--- a/gpsctl.c
++++ b/gpsctl.c
+@@ -15,6 +15,7 @@
+ /* strlcpy() needs _DARWIN_C_SOURCE */
+ #define _DARWIN_C_SOURCE
++#define _BSD_SOURCE
+ #include <stdio.h>
+ #include <stdlib.h>
+--- a/gpsd_json.c
++++ b/gpsd_json.c
+@@ -24,6 +24,7 @@ PERMISSIONS
+ #define __DARWIN_C_LEVEL 200112L
+ /* strlcpy() needs _DARWIN_C_SOURCE */
+ #define _DARWIN_C_SOURCE
++#define _BSD_SOURCE
+ #include <stdio.h>
+ #include <math.h>
+--- a/libgpsd_core.c
++++ b/libgpsd_core.c
+@@ -20,6 +20,7 @@
+ /* strlcpy() needs _DARWIN_C_SOURCE */
+ #define _DARWIN_C_SOURCE
++#define _BSD_SOURCE
+ #include <time.h>
+ #include <stdio.h>