From f6c08ffd8d8020510cbdb325a4f0a4ea79b7bb16 Mon Sep 17 00:00:00 2001 From: Tom Yu Date: Wed, 9 Aug 1995 02:25:21 +0000 Subject: [PATCH] * update_utmp.c (UTMP_FILE): _PATH_UTMP under NetBSD, not _UTMP_PATH; also fix typo (missing '&' on reference to ent) git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6476 dc483132-0cff-0310-8789-dd5450dbe970 --- src/util/pty/ChangeLog | 6 ++++++ src/util/pty/update_utmp.c | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/util/pty/ChangeLog b/src/util/pty/ChangeLog index 56d5e36ba..30d40969f 100644 --- a/src/util/pty/ChangeLog +++ b/src/util/pty/ChangeLog @@ -1,3 +1,9 @@ +Tue Aug 8 22:20:33 1995 Tom Yu + + * update_utmp.c (UTMP_FILE): _PATH_UTMP under NetBSD, not + _UTMP_PATH; also fix typo (missing '&' on reference to + ent) + Tue Aug 8 20:47:01 1995 Tom Yu * update_utmp.c (pty_update_utmp): change #ifdef NO_UT_PID to diff --git a/src/util/pty/update_utmp.c b/src/util/pty/update_utmp.c index 9e40ec7e3..f43ab3940 100644 --- a/src/util/pty/update_utmp.c +++ b/src/util/pty/update_utmp.c @@ -21,8 +21,8 @@ #include "libpty.h" #include "pty-int.h" -#if !defined(UTMP_FILE) && defined(_UTMP_PATH) -#define UTMP_FILE _UTMP_PATH +#if !defined(UTMP_FILE) && defined(_PATH_UTMP) +#define UTMP_FILE _PATH_UTMP #endif long pty_update_utmp (process_type, pid, username, line, host) @@ -124,7 +124,7 @@ long pty_update_utmp (process_type, pid, username, line, host) tty = ttyslot(); if (tty > 0 && (fd = open(UTMP_FILE, O_WRONLY, 0)) >= 0) { (void)lseek(fd, (off_t)(tty * sizeof(struct utmp)), SEEK_SET); - (void)write(fd, (char *)ent, sizeof(struct utmp)); + (void)write(fd, (char *)&ent, sizeof(struct utmp)); (void)close(fd); } -- 2.26.2