summaryrefslogtreecommitdiff
path: root/x11/eterm/patches/patch-ah
diff options
context:
space:
mode:
Diffstat (limited to 'x11/eterm/patches/patch-ah')
-rw-r--r--x11/eterm/patches/patch-ah34
1 files changed, 29 insertions, 5 deletions
diff --git a/x11/eterm/patches/patch-ah b/x11/eterm/patches/patch-ah
index 6decf6ec1c1..b641de71287 100644
--- a/x11/eterm/patches/patch-ah
+++ b/x11/eterm/patches/patch-ah
@@ -1,14 +1,21 @@
-$NetBSD: patch-ah,v 1.6 2006/11/25 14:01:18 sketch Exp $
+$NetBSD: patch-ah,v 1.7 2008/05/09 18:43:07 agc Exp $
--- src/utmp.c.orig 2006-05-11 04:33:40.000000000 +0100
+++ src/utmp.c 2006-11-25 13:01:25.000000000 +0000
-@@ -47,8 +47,13 @@
+@@ -44,11 +44,20 @@
+ static int utmp_pos; /* BSD position of utmp-stamp */
+ # endif
+
++
# ifdef USE_SYSV_UTMP
# ifdef HAVE_UTMPX_H
+# include <utmp.h>
# undef WTMP_FILENAME
-# define WTMP_FILENAME WTMPX_FILE
++# ifndef _PATH_WTMPX
++# define _PATH_WTMPX "/var/log/wtmp"
++# endif
+# if defined(WTMPX_FILE)
+# define WTMP_FILENAME WTMPX_FILE
+# else
@@ -17,7 +24,7 @@ $NetBSD: patch-ah,v 1.6 2006/11/25 14:01:18 sketch Exp $
# define update_wtmp updwtmpx
# else /* HAVE_UTMPX_H */
-@@ -128,9 +133,9 @@
+@@ -128,22 +137,26 @@
privileges(INVOKE);
# ifdef HAVE_UTMPX_H
getutmp(&utmp, &utmp2);
@@ -29,7 +36,24 @@ $NetBSD: patch-ah,v 1.6 2006/11/25 14:01:18 sketch Exp $
# endif
/* set up the new entry */
-@@ -152,16 +157,15 @@
+ strncpy(utmp.ut_id, ut_id, sizeof(utmp.ut_id));
+ strncpy(utmp.ut_line, pty, sizeof(utmp.ut_line));
++# ifndef __APPLE__
+ strncpy(utmp.ut_name, pwent->pw_name, sizeof(utmp.ut_name));
++# endif
+ strncpy(utmp.ut_user, pwent->pw_name, sizeof(utmp.ut_user));
+ strncpy(utmp.ut_host, hostname, sizeof(utmp.ut_host));
+ utmp.ut_type = USER_PROCESS;
+ utmp.ut_pid = getpid();
+ # ifdef HAVE_UTMPX_H
++# ifndef __APPLE__
+ utmp.ut_session = getsid(0);
+ utmp.ut_xtime = time(NULL);
++# endif /* __APPLE__ */
+ utmp.ut_tv.tv_usec = 0;
+ # else
+ utmp.ut_time = time(NULL);
+@@ -152,16 +165,15 @@
/*
* write a utmp entry to the utmp file
*/
@@ -48,7 +72,7 @@ $NetBSD: patch-ah,v 1.6 2006/11/25 14:01:18 sketch Exp $
privileges(REVERT);
return;
fd = 0;
-@@ -177,19 +181,19 @@
+@@ -177,19 +189,19 @@
if (!ut_id[0])
return; /* entry not made */