[PATCH] nixio HAS_SHADOW test link error

The nixio library can mistakenly build without shadow password support due to the
compile-time test failing.

Because the test for HAS_SHADOW in the nixio Makefile uses the default CC flags,
the test may attempt to cross-compile with different VFP abi than libc does and
will therefore not link. Passing CCFLAGS on the command line builds the test
correctly and will enable HAS_SHADOW if available.
This commit is contained in:
Jo-Philipp Wich 2012-08-29 13:04:44 +00:00
parent ea1fc49a7f
commit ec5487649e

View file

@ -10,7 +10,7 @@ AXTLS_VERSION = 1.2.1
AXTLS_DIR = axTLS AXTLS_DIR = axTLS
AXTLS_FILE = $(AXTLS_DIR)-$(AXTLS_VERSION).tar.gz AXTLS_FILE = $(AXTLS_DIR)-$(AXTLS_VERSION).tar.gz
#NIXIO_TLS ?= openssl #NIXIO_TLS ?= openssl
NIXIO_SHADOW ?= $(shell echo 'int main(void){ return !getspnam("root"); }' | $(CC) -include shadow.h -xc -o/dev/null - 2>/dev/null && echo yes) NIXIO_SHADOW ?= $(shell echo 'int main(void){ return !getspnam("root"); }' | $(CC) $(CFLAGS) -include shadow.h -xc -o/dev/null - 2>/dev/null && echo yes)
NIXIO_SO = nixio.so NIXIO_SO = nixio.so
NIXIO_LDFLAGS = NIXIO_LDFLAGS =