summaryrefslogtreecommitdiffstats
path: root/package/uhttpd/src/Makefile
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2010-11-06 16:19:04 +0000
committerJo-Philipp Wich <jow@openwrt.org>2010-11-06 16:19:04 +0000
commitfa644368ed7583c93dd1e4dffbafeb0e54167670 (patch)
treebf51d9c7e76d2e98935d7acf7331e68512095fe8 /package/uhttpd/src/Makefile
parentcf313b63bc5fc41180552327fdbc4b7ca97fbb43 (diff)
downloadmaster-31e0f0ae-fa644368ed7583c93dd1e4dffbafeb0e54167670.tar.gz
master-31e0f0ae-fa644368ed7583c93dd1e4dffbafeb0e54167670.tar.bz2
master-31e0f0ae-fa644368ed7583c93dd1e4dffbafeb0e54167670.zip
uhttpd: make it work without shadow password support
SVN-Revision: 23897
Diffstat (limited to 'package/uhttpd/src/Makefile')
-rw-r--r--package/uhttpd/src/Makefile6
1 files changed, 6 insertions, 0 deletions
diff --git a/package/uhttpd/src/Makefile b/package/uhttpd/src/Makefile
index 06d61bdef3..6dcc3555f1 100644
--- a/package/uhttpd/src/Makefile
+++ b/package/uhttpd/src/Makefile
@@ -13,6 +13,12 @@ LIB = -Wl,--export-dynamic -lcrypt -ldl
TLSLIB =
LUALIB =
+HAVE_SHADOW=$(shell echo 'int main(void){ return !getspnam("root"); }' | \
+ $(CC) -include shadow.h -xc -o/dev/null - 2>/dev/null && echo yes)
+
+ifeq ($(HAVE_SHADOW),yes)
+ CFLAGS += -DHAVE_SHADOW
+endif
world: compile