Gentoo Archives: gentoo-commits

From: Sven Wegener <swegener@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-misc/screen/files/, app-misc/screen/
Date: Thu, 04 Jan 2018 23:18:58
Message-Id: 1515107920.10f7f30cb2ade13389c2a104128a9b86355f52c6.swegener@gentoo
1 commit: 10f7f30cb2ade13389c2a104128a9b86355f52c6
2 Author: Sven Wegener <swegener <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jan 4 23:16:48 2018 +0000
4 Commit: Sven Wegener <swegener <AT> gentoo <DOT> org>
5 CommitDate: Thu Jan 4 23:18:40 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=10f7f30c
7
8 app-misc/screen: Fix building on uclibc, bug #562752
9
10 Closes: https://bugs.gentoo.org/562752
11 Package-Manager: Portage-2.3.14, Repoman-2.3.6
12
13 app-misc/screen/files/screen-4.6.2-utmp-exit.patch | 55 ++++++++++++++++++++++
14 app-misc/screen/screen-4.6.2.ebuild | 3 +-
15 2 files changed, 57 insertions(+), 1 deletion(-)
16
17 diff --git a/app-misc/screen/files/screen-4.6.2-utmp-exit.patch b/app-misc/screen/files/screen-4.6.2-utmp-exit.patch
18 new file mode 100644
19 index 00000000000..11adf69a536
20 --- /dev/null
21 +++ b/app-misc/screen/files/screen-4.6.2-utmp-exit.patch
22 @@ -0,0 +1,55 @@
23 +From 2f1b9dfe03133c9b77ea450aed088d65128dc547 Mon Sep 17 00:00:00 2001
24 +From: =?UTF-8?q?Amadeusz=20S=C5=82awi=C5=84ski?= <amade@××××××.net>
25 +Date: Tue, 5 Apr 2016 12:47:08 +0200
26 +Subject: [PATCH] check if we have ut_exit in utmpx struct
27 +
28 +---
29 + acconfig.h | 5 +++++
30 + configure.ac | 4 ++++
31 + utmp.c | 2 ++
32 + 3 files changed, 11 insertions(+)
33 +
34 +diff --git a/acconfig.h b/acconfig.h
35 +index 656e117..d173c9c 100644
36 +--- a/acconfig.h
37 ++++ b/acconfig.h
38 +@@ -215,6 +215,11 @@
39 + #undef HAVE_UTEMPTER
40 +
41 + /*
42 ++ * Define if your utmpx has ut_exit struct
43 ++ */
44 ++#undef HAVE_UT_EXIT
45 ++
46 ++/*
47 + * If your system has the calls setreuid() and setregid(),
48 + * define HAVE_SETREUID. Otherwise screen will use a forked process to
49 + * safely create output files without retaining any special privileges.
50 +diff --git a/configure.ac b/configure.ac
51 +index 1a75020..8457619 100644
52 +--- a/configure.ac
53 ++++ b/configure.ac
54 +@@ -374,6 +374,10 @@ if test "$have_utempter" = yes; then
55 + AC_DEFINE(HAVE_UTEMPTER)
56 + LIBS="$LIBS -lutempter"
57 + fi
58 ++AC_CHECKING(ut_exit)
59 ++AC_TRY_COMPILE([
60 ++#include <utmpx.h>
61 ++],[struct utmpx u; u.ut_exit.e_exit;], AC_DEFINE(HAVE_UT_EXIT))
62 +
63 + dnl
64 + dnl **** signal handling ****
65 +diff --git a/utmp.c b/utmp.c
66 +index da8d7ff..c864d07 100644
67 +--- a/utmp.c
68 ++++ b/utmp.c
69 +@@ -381,7 +381,7 @@ static int pututslot(slot_t slot, struct utmpx *u, char *host, Window *win)
70 + struct utmp *u;
71 + {
72 + u->ut_type = DEAD_PROCESS;
73 +-#if (!defined(linux) || defined(EMPTY)) && !defined(__CYGWIN__)
74 ++#if defined(HAVE_UT_EXIT)
75 + u->ut_exit.e_termination = 0;
76 + u->ut_exit.e_exit = 0;
77 + #endif
78
79 diff --git a/app-misc/screen/screen-4.6.2.ebuild b/app-misc/screen/screen-4.6.2.ebuild
80 index 01169b42901..7b571355fa9 100644
81 --- a/app-misc/screen/screen-4.6.2.ebuild
82 +++ b/app-misc/screen/screen-4.6.2.ebuild
83 @@ -1,4 +1,4 @@
84 -# Copyright 1999-2017 Gentoo Foundation
85 +# Copyright 1999-2018 Gentoo Foundation
86 # Distributed under the terms of the GNU General Public License v2
87
88 EAPI=6
89 @@ -35,6 +35,7 @@ DEPEND="${CDEPEND}
90 PATCHES=(
91 # Don't use utempter even if it is found on the system.
92 "${FILESDIR}"/${PN}-4.3.0-no-utempter.patch
93 + "${FILESDIR}"/${P}-utmp-exit.patch
94 )
95
96 pkg_setup() {