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 <bernhard.nortmann@web.de>
This commit is contained in:
Bernhard Nortmann 2016-05-04 13:38:43 +02:00
parent 8c50707685
commit 805d2a8e16

View File

@ -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