diff options
author | Cy Schubert <cy@FreeBSD.org> | 2010-07-22 03:22:48 +0000 |
---|---|---|
committer | Cy Schubert <cy@FreeBSD.org> | 2010-07-22 03:22:48 +0000 |
commit | f86086845f9a1d711b350da7ca17d8e30c50216c (patch) | |
tree | 009975f8b9fc2d07bee749dd7c811edb48a74b8a /sysutils/screen/files | |
parent | 8a087f52092a61fd8332ea776f6dbea80aa5401c (diff) |
Notes
Diffstat (limited to 'sysutils/screen/files')
-rw-r--r-- | sysutils/screen/files/patch-utmp.c | 39 |
1 files changed, 5 insertions, 34 deletions
diff --git a/sysutils/screen/files/patch-utmp.c b/sysutils/screen/files/patch-utmp.c index 4e8864c58c06..44d8d613334c 100644 --- a/sysutils/screen/files/patch-utmp.c +++ b/sysutils/screen/files/patch-utmp.c @@ -1,30 +1,6 @@ ---- utmp.c.orig 2003-09-08 07:27:17.000000000 -0700 -+++ utmp.c 2009-12-21 15:10:06.000000000 -0800 -@@ -21,6 +21,9 @@ - **************************************************************** - */ - -+#ifdef __FreeBSD__ -+#include <sys/param.h> -+#endif - #include <sys/types.h> - #include <sys/stat.h> - #include <fcntl.h> -@@ -70,8 +73,13 @@ - * (won't work for login-slots) - */ - #if (defined(sun) && defined(SVR4) && defined(GETUTENT)) || defined(HAVE_UTEMPTER) -+/* XXX FreeBSD-9 includes libutempter however if UTMP_HELPER is defined, -+ the build is broken due to utmpfd not being defined. -+*/ -+#if defined(__FreeBSD_version) && (__FreeBSD_version < 900004 || __FreeBSD_version >= 900007) || !defined(__FreeBSD_version) - # define UTMP_HELPER - #endif -+#endif - - - -@@ -589,7 +597,7 @@ +--- utmp.c ++++ utmp.c +@@ -589,7 +589,7 @@ struct utmp *u; { u->ut_type = DEAD_PROCESS; @@ -33,17 +9,12 @@ u->ut_exit.e_termination = 0; u->ut_exit.e_exit = 0; #endif -@@ -726,9 +734,12 @@ - char *line, *user; - int pid; +@@ -728,7 +728,7 @@ { -+ time_t temp; -+ strncpy(u->ut_line, line, sizeof(u->ut_line)); strncpy(u->ut_name, user, sizeof(u->ut_name)); - (void)time((time_t *)&u->ut_time); -+ (void)time(&temp); -+ u->ut_time = temp; ++ u->ut_time = time(NULL); } static slot_t |