diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2011-08-11 23:21:06 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2011-08-11 23:21:06 +0000 |
commit | 0d73b6d411026fbd9a949b493ff4cb1080547835 (patch) | |
tree | f5d32eee7418b9d17f17fbea34d0b467eafceddc /libs/nixio/src | |
parent | 11ff9204cf9b2fd451bf8e0e0dd3fe3f078c2808 (diff) |
libs/nixio: allow building without shadow password support
Diffstat (limited to 'libs/nixio/src')
-rw-r--r-- | libs/nixio/src/user.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libs/nixio/src/user.c b/libs/nixio/src/user.c index bc2184f99..b701bac95 100644 --- a/libs/nixio/src/user.c +++ b/libs/nixio/src/user.c @@ -28,7 +28,9 @@ #include <pwd.h> #ifndef BSD +#ifndef NO_SHADOW #include <shadow.h> +#endif #include <crypt.h> #endif @@ -162,6 +164,7 @@ static int nixio_getpw(lua_State *L) { } #ifndef BSD +#ifndef NO_SHADOW static int nixio__push_spwd(lua_State *L, struct spwd *sp) { lua_createtable(L, 0, 9); lua_pushstring(L, sp->sp_namp); @@ -216,6 +219,7 @@ static int nixio_getsp(lua_State *L) { return nixio__push_spwd(L, sp); } } +#endif /* !NO_SHADOW */ #endif /* !BSD */ static int nixio_crypt(lua_State *L) { @@ -239,8 +243,10 @@ static const luaL_reg R[] = { {"getgr", nixio_getgr}, {"getpw", nixio_getpw}, #ifndef BSD +#ifndef NO_SHADOW {"getsp", nixio_getsp}, #endif +#endif {NULL, NULL} }; |