From 805d2a8e16a4dbf8c8010e6029f4093ae34ee427 Mon Sep 17 00:00:00 2001 From: Bernhard Nortmann Date: Wed, 4 May 2016 13:38:43 +0200 Subject: [PATCH] Makefile: Provide a way to pass explicit _NETBSD_SOURCE Commit 73c20eea7bf0f12795ab94685fbb98eda0cf2cce removed that symbol from fel.c - this adds it back (in the Makefile) to address #22. Caveat: This probably requires you to use "make OS=NetBSD". I have currently no way of testing it; we're only checking Linux and OSX builds. Signed-off-by: Bernhard Nortmann --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile b/Makefile index 0df62d6..881cf83 100644 --- a/Makefile +++ b/Makefile @@ -27,6 +27,10 @@ DEFINES = -D_POSIX_C_SOURCE=200112L DEFINES += -D_BSD_SOURCE # glibc 2.20+ also requires _DEFAULT_SOURCE DEFINES += -D_DEFAULT_SOURCE +ifeq (NetBSD,$(OS)) +# add explicit _NETBSD_SOURCE, see https://github.com/linux-sunxi/sunxi-tools/pull/22 +DEFINES += -D_NETBSD_SOURCE +endif # Tools useful on host and target TOOLS = sunxi-fexc sunxi-bootinfo sunxi-fel sunxi-nand-part