1 --- getlogin.c.orig 2007-08-19 17:24:10.000000000 -0700
2 +++ getlogin.c 2007-08-19 20:51:27.000000000 -0700
12 #define THREAD_LOCK() if (__isthreaded) _pthread_mutex_lock(&logname_mutex)
13 #define THREAD_UNLOCK() if (__isthreaded) _pthread_mutex_unlock(&logname_mutex)
15 -extern int _getlogin(char *, int);
16 +extern int __getlogin(char *, int);
18 int _logname_valid; /* known to setlogin() */
19 static pthread_mutex_t logname_mutex = PTHREAD_MUTEX_INITIALIZER;
21 static char logname[MAXLOGNAME];
23 if (_logname_valid == 0) {
24 - if (_getlogin(logname, sizeof(logname)) < 0) {
25 + if (__getlogin(logname, sizeof(logname)) < 0) {
33 -getlogin_r(char *logname, int namelen)
34 +getlogin_r(char *logname, size_t namelen)