aboutsummaryrefslogtreecommitdiffstats
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
commit160c1f2b3778a8d2f57aebb4b9d8f7efffd6b67e (patch)
treead63c17608639e2dc145c5d89bb1d9f873e44674 /package/uhttpd/src/Makefile
parentc842c936476fb06f727a8fd5d9323ab6dac6ada6 (diff)
downloadmaster-187ad058-160c1f2b3778a8d2f57aebb4b9d8f7efffd6b67e.tar.gz
master-187ad058-160c1f2b3778a8d2f57aebb4b9d8f7efffd6b67e.tar.bz2
master-187ad058-160c1f2b3778a8d2f57aebb4b9d8f7efffd6b67e.zip
[package] uhttpd: make it work without shadow password support
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@23897 3c298f89-4303-0410-b956-a3cf2f4a3e73
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