Skip to contentSkip to conversation

safec: Define _GNU_SOURCE

PATCH New Khem Raj 1 participant 1 message Sep 11, 2019

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 safec: Define _GNU_SOURCE

musl does not define this variable automatically but safec does provide wrapper for some GNU extentions as well e.g.

error: implicit declaration of function 'localtime_r' is invalid in C99

---
 meta-oe/recipes-core/safec/safec_3.4.bb | 2 ++
 1 file changed, 2 insertions(+)
meta-oe/recipes-core/safec/safec_3.4.bb +2 -0
index b4c125faf4..cc1fbcb735 100644
@@ -10,6 +10,8 @@ S = "${WORKDIR}/git"
 SRCREV = "62e6b2df55084316d027165d286e46beb40513dc"
 SRC_URI = "git://github.com/rurban/safeclib.git"
 
+CPPFLAGS_append_libc-musl = " -D_GNU_SOURCE"
+
 COMPATIBLE_HOST = '(x86_64|i.86|powerpc|powerpc64|arm).*-linux'
 
 RDEPENDS_${PN} = "perl"
Signature · 1 line
2.23.0