From: Jo-Philipp Wich Date: Wed, 29 Aug 2012 13:04:44 +0000 (+0000) Subject: [PATCH] nixio HAS_SHADOW test link error X-Git-Tag: 0.11.0~172 X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fluci.git;a=commitdiff_plain;h=ec5487649e426957370a1dc30aacd32fb57ad691 [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. --- diff --git a/libs/nixio/Makefile b/libs/nixio/Makefile index 24ccb0175..49ba3ff22 100644 --- a/libs/nixio/Makefile +++ b/libs/nixio/Makefile @@ -10,7 +10,7 @@ AXTLS_VERSION = 1.2.1 AXTLS_DIR = axTLS AXTLS_FILE = $(AXTLS_DIR)-$(AXTLS_VERSION).tar.gz #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_LDFLAGS =