diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/unistd/getlogin.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/unistd/getlogin.c b/src/unistd/getlogin.c index 462b5a6d..bd110395 100644 --- a/src/unistd/getlogin.c +++ b/src/unistd/getlogin.c @@ -1,11 +1,15 @@ #include "stddef.h" #include "sys/types.h" #include <unistd.h> +#include "stdlib.h" char * getlogin(void) { - return 0; + /* TODO: get actual controlling terminal, then read utmpx */ + + return getenv("LOGNAME"); } + /* POSIX(1) */ |
