500-eglibc_config.patch 567 B

1234567891011121314151617181920212223242526
  1. --- a/src/lposix.c
  2. +++ b/src/lposix.c
  3. @@ -727,11 +727,13 @@ static int Pctermid(lua_State *L) /** c
  4. }
  5. +#ifndef NO_GETLOGIN
  6. static int Pgetlogin(lua_State *L) /** getlogin() */
  7. {
  8. lua_pushstring(L, getlogin());
  9. return 1;
  10. }
  11. +#endif
  12. static void Fgetpasswd(lua_State *L, int i, const void *data)
  13. @@ -1052,7 +1054,9 @@ static const luaL_reg R[] =
  14. {"getcwd", Pgetcwd},
  15. {"getenv", Pgetenv},
  16. {"getgroup", Pgetgroup},
  17. +#ifndef NO_GETLOGIN
  18. {"getlogin", Pgetlogin},
  19. +#endif
  20. {"getpasswd", Pgetpasswd},
  21. {"getpid", Pgetpid},
  22. {"glob", Pglob},