about summary refs log tree commit diff
path: root/posix
diff options
context:
space:
mode:
Diffstat (limited to 'posix')
-rw-r--r--posix/Makefile2
-rw-r--r--posix/unistd.h6
2 files changed, 7 insertions, 1 deletions
diff --git a/posix/Makefile b/posix/Makefile
index 6766a8a17d..e3eaad4369 100644
--- a/posix/Makefile
+++ b/posix/Makefile
@@ -39,7 +39,7 @@ routines :=								      \
 	getpid getppid							      \
 	getuid geteuid getgid getegid getgroups setuid setgid group_member    \
 	getpgid setpgid getpgrp setpgrp getsid setsid			      \
-	getlogin setlogin						      \
+	getlogin getlogin_r setlogin					      \
 	pathconf sysconf fpathconf					      \
 	glob fnmatch regex						      \
 	confstr								      \
diff --git a/posix/unistd.h b/posix/unistd.h
index 89c8fd4db9..72ecd96023 100644
--- a/posix/unistd.h
+++ b/posix/unistd.h
@@ -541,6 +541,12 @@ extern int tcsetpgrp __P ((int __fd, __pid_t __pgrp_id));
 
 /* Return the login name of the user.  */
 extern char *getlogin __P ((void));
+#ifdef __USE_REENTRANT
+/* Return at most NAME_LEN characters of the login name of the user in NAME.
+   If it cannot be determined or some other error occured, return the error
+   code.  Otherwise return 0.  */
+extern int getlogin_r __P ((char *__name, size_t __name_len));
+#endif
 
 #ifdef	__USE_BSD
 /* Set the login name returned by `getlogin'.  */