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.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/libc/unistd/getlogin.c b/libc/unistd/getlogin.c
index e1685692c..0747a49f6 100644
--- a/libc/unistd/getlogin.c
+++ b/libc/unistd/getlogin.c
@@ -29,14 +29,15 @@
* the user specify whatever they want via the LOGNAME environment
* variable, or we return NULL if getenv() fails to find anything */
-char * getlogin(void)
+extern char attribute_hidden * __getlogin(void)
{
- return (getenv("LOGNAME"));
+ return (__getenv("LOGNAME"));
}
+strong_alias(__getlogin,getlogin)
int getlogin_r(char *name, size_t len)
{
- char * foo = getenv("LOGNAME");
+ char * foo = __getenv("LOGNAME");
if (! foo)
return -1;
@@ -48,7 +49,7 @@ int getlogin_r(char *name, size_t len)
char *cuserid(char *s)
{
- char *name = getlogin();
+ char *name = __getlogin();
if (s) {
return(__strcpy(s, name ? name : ""));
}