summaryrefslogtreecommitdiff
path: root/libc/unistd/getlogin.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc/unistd/getlogin.c')
-rw-r--r--libc/unistd/getlogin.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libc/unistd/getlogin.c b/libc/unistd/getlogin.c
index 6db73ae1c..d1a00feb9 100644
--- a/libc/unistd/getlogin.c
+++ b/libc/unistd/getlogin.c
@@ -46,3 +46,11 @@ int getlogin_r(char *name, size_t len)
return 0;
}
+char *cuserid(char *name)
+{
+ char *name = getlogin();
+ if (s) {
+ return(strcpy(s, name ? name : ""));
+ }
+ return name;
+}