diff options
| author | "Steven J. Hill" <sjhill@realitydiluted.com> | 2005-12-06 03:33:06 +0000 |
|---|---|---|
| committer | "Steven J. Hill" <sjhill@realitydiluted.com> | 2005-12-06 03:33:06 +0000 |
| commit | bd7bace793536f027790396d6358c14299e8595b (patch) | |
| tree | dcc993baefecea2b27019336c4502e61d49b98c5 /libc/misc/utmp | |
| parent | 7608c85140162446c3830421eb94ae42a1bbb893 (diff) | |
| download | uClibc-alpine-bd7bace793536f027790396d6358c14299e8595b.tar.bz2 uClibc-alpine-bd7bace793536f027790396d6358c14299e8595b.tar.xz | |
Big merge from trunk. Stop the madness!
Diffstat (limited to 'libc/misc/utmp')
| -rw-r--r-- | libc/misc/utmp/utent.c | 9 | ||||
| -rw-r--r-- | libc/misc/utmp/wtent.c | 2 |
2 files changed, 4 insertions, 7 deletions
diff --git a/libc/misc/utmp/utent.c b/libc/misc/utmp/utent.c index c3d9ab620..e03d4528f 100644 --- a/libc/misc/utmp/utent.c +++ b/libc/misc/utmp/utent.c @@ -23,14 +23,11 @@ #ifdef __UCLIBC_HAS_THREADS__ -#include <pthread.h> +# include <pthread.h> static pthread_mutex_t utmplock = PTHREAD_MUTEX_INITIALIZER; -# define LOCK __pthread_mutex_lock(&utmplock) -# define UNLOCK __pthread_mutex_unlock(&utmplock) -#else -# define LOCK -# define UNLOCK #endif +#define LOCK __pthread_mutex_lock(&utmplock) +#define UNLOCK __pthread_mutex_unlock(&utmplock) diff --git a/libc/misc/utmp/wtent.c b/libc/misc/utmp/wtent.c index bb5244878..0900ef379 100644 --- a/libc/misc/utmp/wtent.c +++ b/libc/misc/utmp/wtent.c @@ -34,7 +34,7 @@ void logwtmp (const char *line, const char *name, const char *host) __memset (&(lutmp), 0, sizeof (struct utmp)); lutmp.ut_type = (name && *name)? USER_PROCESS : DEAD_PROCESS; - lutmp.ut_pid = getpid(); + lutmp.ut_pid = __getpid(); __strncpy(lutmp.ut_line, line, sizeof(lutmp.ut_line)-1); __strncpy(lutmp.ut_name, name, sizeof(lutmp.ut_name)-1); __strncpy(lutmp.ut_host, host, sizeof(lutmp.ut_host)-1); |
