diff options
author | Cy Schubert <cy@FreeBSD.org> | 2019-10-29 04:23:50 +0000 |
---|---|---|
committer | Cy Schubert <cy@FreeBSD.org> | 2019-10-29 04:23:50 +0000 |
commit | 2fd1af8b155a9efcc60216318238ad1132c6c780 (patch) | |
tree | fe3d9a372c57c6c1abdd60ab57fd05185a51e6ad /sysutils/screen/files/patch-utmp.c | |
parent | Resolve upstream bug #55482: TERMCAP can break on systems that don't (diff) |
Correctly identify utmpx support in FreeBSD.
- FreeBSD's utmpx is incorrectly identified in ./configure.
- Because of the falsely identified utmpx support in the ./configure
script, a previously applied patch, which didn't work, is no longer
needed.
PR: 241530
Reported by: Henry David Bartholomew <PopularMoment@protonmail.com>
Daniel Drinnon <ddrinnon@cdor.net>
Notes
Notes:
svn path=/head/; revision=515953
Diffstat (limited to 'sysutils/screen/files/patch-utmp.c')
-rw-r--r-- | sysutils/screen/files/patch-utmp.c | 31 |
1 files changed, 8 insertions, 23 deletions
diff --git a/sysutils/screen/files/patch-utmp.c b/sysutils/screen/files/patch-utmp.c index 64550c88add5..008106464429 100644 --- a/sysutils/screen/files/patch-utmp.c +++ b/sysutils/screen/files/patch-utmp.c @@ -1,6 +1,6 @@ ---- utmp.c.orig 2019-10-01 15:08:00.000000000 -0700 -+++ utmp.c 2019-10-08 17:56:32.853627000 -0700 -@@ -26,9 +26,13 @@ +--- utmp.c.orig 2017-01-17 11:28:29.397404660 -0800 ++++ utmp.c 2017-02-10 16:48:34.902236000 -0800 +@@ -26,6 +26,7 @@ **************************************************************** */ @@ -8,22 +8,7 @@ #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> -+#ifdef __FreeBSD_version -+#define GETUTENT -+#endif - - #include "config.h" - #include "screen.h" -@@ -102,7 +106,7 @@ - - static int utmpok; - static char UtmpName[] = UTMPFILE; --#ifndef UTMP_HELPER -+#if !defined(UTMP_HELPER) || defined(__FreeBSD__) - static int utmpfd = -1; - #endif - -@@ -409,12 +413,6 @@ +@@ -409,12 +410,6 @@ register slot_t slot; struct utmp u; int saved_ut; @@ -36,7 +21,7 @@ wi->w_slot = (slot_t)0; if (!utmpok || wi->w_type != W_TYPE_PTY) -@@ -435,51 +433,13 @@ +@@ -435,51 +430,13 @@ makeuser(&u, stripdev(wi->w_tty), LoginName, wi->w_pid); #ifdef UTHOST @@ -91,7 +76,7 @@ { Msg(errno,"Could not write %s", UtmpName); UT_CLOSE; -@@ -598,7 +558,7 @@ +@@ -598,7 +555,7 @@ struct utmp *u; { u->ut_type = DEAD_PROCESS; @@ -100,7 +85,7 @@ u->ut_exit.e_termination = 0; u->ut_exit.e_exit = 0; #endif -@@ -631,7 +591,11 @@ +@@ -631,7 +588,11 @@ /* must use temp variable because of NetBSD/sparc64, where * ut_xtime is long(64) but time_t is int(32) */ (void)time(&now); @@ -113,7 +98,7 @@ } static slot_t -@@ -743,7 +707,11 @@ +@@ -743,7 +704,11 @@ strncpy(u->ut_line, line, sizeof(u->ut_line)); strncpy(u->ut_name, user, sizeof(u->ut_name)); (void)time(&now); |