[packages] package luaposix, the general Lua POSIX library
[openwrt/svn-archive/archive.git] / lang / luaposix / patches / 100-eglibc-compat.patch
1 --- a/lposix.c
2 +++ b/lposix.c
3 @@ -960,11 +960,13 @@ static int Pctermid(lua_State *L) /** c
4 }
5
6
7 +#ifndef NO_GETLOGIN
8 static int Pgetlogin(lua_State *L) /** getlogin() */
9 {
10 lua_pushstring(L, getlogin());
11 return 1;
12 }
13 +#endif
14
15
16 static void Fgetpasswd(lua_State *L, int i, const void *data)
17 @@ -1778,7 +1780,9 @@ static const luaL_reg R[] =
18 #if _POSIX_VERSION >= 200112L
19 {"getgroups", Pgetgroups},
20 #endif
21 +#ifndef NO_GETLOGIN
22 {"getlogin", Pgetlogin},
23 +#endif
24 {"getopt_long", Pgetopt_long},
25 {"getpasswd", Pgetpasswd},
26 {"getpid", Pgetpid},