You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
699 B

  1. diff --git a/ext/posix/unistd.c b/ext/posix/unistd.c
  2. index 9276640..69c8cef 100644
  3. --- a/ext/posix/unistd.c
  4. +++ b/ext/posix/unistd.c
  5. @@ -525,6 +525,7 @@ Pgetgroups(lua_State *L)
  6. #endif
  7. +#ifndef NO_GETLOGIN
  8. /***
  9. Current logged-in user.
  10. @treturn[1] string username, if successful
  11. @@ -537,6 +538,7 @@ Pgetlogin(lua_State *L)
  12. checknargs(L, 0);
  13. return pushstringresult(getlogin());
  14. }
  15. +#endif
  16. /***
  17. @@ -1044,7 +1046,9 @@ static const luaL_Reg posix_unistd_fns[] =
  18. LPOSIX_FUNC( Pgetegid ),
  19. LPOSIX_FUNC( Pgeteuid ),
  20. LPOSIX_FUNC( Pgetgid ),
  21. +#ifndef NO_GETLOGIN
  22. LPOSIX_FUNC( Pgetlogin ),
  23. +#endif
  24. LPOSIX_FUNC( Pgetpgrp ),
  25. LPOSIX_FUNC( Pgetpid ),
  26. LPOSIX_FUNC( Pgetppid ),