projects
/
openwrt
/
staging
/
mkresin.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
uhttpd: make it work without shadow password support
[openwrt/staging/mkresin.git]
/
package
/
uhttpd
/
src
/
Makefile
diff --git
a/package/uhttpd/src/Makefile
b/package/uhttpd/src/Makefile
index 06d61bdef3b3e7b9d64aa2edb764c8d815ffa247..6dcc3555f196928ab72de7eb498ee6668d868079 100644
(file)
--- 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