packages/lang/luaposix/patches/100-eglibc-compat.patch
hauke f24c4210db luaposix: update to v31
v31 adds more interfaces to POSIX.
New compared to v5.1.11:
nanosleep, open, close, read, write, pipe, dup, dup2, setfl, getfl, fcntl,
poll, fnmatch, memrchr, strptime, statvfs, mkdtemp, isatty, openpt, ptsname,
grantpt, unlockpt, killpg, openpty, realpath, socket functions and constants,
fixes, optimizations, etc.
New dependency: luabitop (provided as a separate patch)

Signed-off-by: Maxim Storchak <m.storchak@gmail.com>


git-svn-id: svn://svn.openwrt.org/openwrt/packages@40673 3c298f89-4303-0410-b956-a3cf2f4a3e73
2014-05-03 11:22:54 +00:00

29 lines
605 B
Diff

--- a/ext/posix/posix.c
+++ b/ext/posix/posix.c
@@ -1970,6 +1970,7 @@ static int Pctermid(lua_State *L)
return 1;
}
+#ifndef NO_GETLOGIN
/***
Current logged-in user.
@see getlogin(3)
@@ -1980,6 +1981,7 @@ static int Pgetlogin(lua_State *L)
lua_pushstring(L, getlogin());
return 1;
}
+#endif
static void Fgetpasswd(lua_State *L, int i, const void *data)
{
@@ -3786,7 +3788,9 @@ static const luaL_Reg R[] =
#if _POSIX_VERSION >= 200112L
MENTRY( Pgetgroups ),
#endif
+#ifndef NO_GETLOGIN
MENTRY( Pgetlogin ),
+#endif
MENTRY( Pgetopt ),
MENTRY( Pgetpasswd ),
MENTRY( Pgetpid ),