mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-08-05 12:38:09 -07:00
app-misc/screen: Fix building on uclibc, bug #562752
Closes: https://bugs.gentoo.org/562752 Package-Manager: Portage-2.3.14, Repoman-2.3.6
This commit is contained in:
55
app-misc/screen/files/screen-4.6.2-utmp-exit.patch
Normal file
55
app-misc/screen/files/screen-4.6.2-utmp-exit.patch
Normal file
@@ -0,0 +1,55 @@
|
||||
From 2f1b9dfe03133c9b77ea450aed088d65128dc547 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Amadeusz=20S=C5=82awi=C5=84ski?= <amade@asmblr.net>
|
||||
Date: Tue, 5 Apr 2016 12:47:08 +0200
|
||||
Subject: [PATCH] check if we have ut_exit in utmpx struct
|
||||
|
||||
---
|
||||
acconfig.h | 5 +++++
|
||||
configure.ac | 4 ++++
|
||||
utmp.c | 2 ++
|
||||
3 files changed, 11 insertions(+)
|
||||
|
||||
diff --git a/acconfig.h b/acconfig.h
|
||||
index 656e117..d173c9c 100644
|
||||
--- a/acconfig.h
|
||||
+++ b/acconfig.h
|
||||
@@ -215,6 +215,11 @@
|
||||
#undef HAVE_UTEMPTER
|
||||
|
||||
/*
|
||||
+ * Define if your utmpx has ut_exit struct
|
||||
+ */
|
||||
+#undef HAVE_UT_EXIT
|
||||
+
|
||||
+/*
|
||||
* If your system has the calls setreuid() and setregid(),
|
||||
* define HAVE_SETREUID. Otherwise screen will use a forked process to
|
||||
* safely create output files without retaining any special privileges.
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 1a75020..8457619 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -374,6 +374,10 @@ if test "$have_utempter" = yes; then
|
||||
AC_DEFINE(HAVE_UTEMPTER)
|
||||
LIBS="$LIBS -lutempter"
|
||||
fi
|
||||
+AC_CHECKING(ut_exit)
|
||||
+AC_TRY_COMPILE([
|
||||
+#include <utmpx.h>
|
||||
+],[struct utmpx u; u.ut_exit.e_exit;], AC_DEFINE(HAVE_UT_EXIT))
|
||||
|
||||
dnl
|
||||
dnl **** signal handling ****
|
||||
diff --git a/utmp.c b/utmp.c
|
||||
index da8d7ff..c864d07 100644
|
||||
--- a/utmp.c
|
||||
+++ b/utmp.c
|
||||
@@ -381,7 +381,7 @@ static int pututslot(slot_t slot, struct utmpx *u, char *host, Window *win)
|
||||
struct utmp *u;
|
||||
{
|
||||
u->ut_type = DEAD_PROCESS;
|
||||
-#if (!defined(linux) || defined(EMPTY)) && !defined(__CYGWIN__)
|
||||
+#if defined(HAVE_UT_EXIT)
|
||||
u->ut_exit.e_termination = 0;
|
||||
u->ut_exit.e_exit = 0;
|
||||
#endif
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 1999-2017 Gentoo Foundation
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
@@ -35,6 +35,7 @@ DEPEND="${CDEPEND}
|
||||
PATCHES=(
|
||||
# Don't use utempter even if it is found on the system.
|
||||
"${FILESDIR}"/${PN}-4.3.0-no-utempter.patch
|
||||
"${FILESDIR}"/${P}-utmp-exit.patch
|
||||
)
|
||||
|
||||
pkg_setup() {
|
||||
|
||||
Reference in New Issue
Block a user