Changeset 7351
- Timestamp:
- 08/12/11 01:21:06 (22 months ago)
- Location:
- luci/trunk/libs/nixio
- Files:
-
- 2 modified
-
Makefile (modified) (2 diffs)
-
src/user.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
luci/trunk/libs/nixio/Makefile
r5954 r7351 11 11 AXTLS_FILE = $(AXTLS_DIR)-$(AXTLS_VERSION).tar.gz 12 12 NIXIO_TLS ?= openssl 13 NIXIO_SHADOW ?= $(shell echo 'int main(void){ return !getspnam("root"); }' | $(CC) -include shadow.h -xc -o/dev/null - 2>/dev/null && echo yes) 13 14 NIXIO_SO = nixio.so 14 15 NIXIO_LDFLAGS = … … 44 45 ifeq ($(NIXIO_TLS),) 45 46 NIXIO_CFLAGS += -DNO_TLS 47 endif 48 49 ifneq ($(NIXIO_SHADOW),yes) 50 NIXIO_CFLAGS += -DNO_SHADOW 46 51 endif 47 52 -
luci/trunk/libs/nixio/src/user.c
r5414 r7351 29 29 30 30 #ifndef BSD 31 #ifndef NO_SHADOW 31 32 #include <shadow.h> 33 #endif 32 34 #include <crypt.h> 33 35 #endif … … 163 165 164 166 #ifndef BSD 167 #ifndef NO_SHADOW 165 168 static int nixio__push_spwd(lua_State *L, struct spwd *sp) { 166 169 lua_createtable(L, 0, 9); … … 217 220 } 218 221 } 222 #endif /* !NO_SHADOW */ 219 223 #endif /* !BSD */ 220 224 … … 240 244 {"getpw", nixio_getpw}, 241 245 #ifndef BSD 246 #ifndef NO_SHADOW 242 247 {"getsp", nixio_getsp}, 248 #endif 243 249 #endif 244 250 {NULL, NULL}
