diff options
author | Christian Heim <phreak@gentoo.org> | 2007-11-01 19:09:22 +0000 |
---|---|---|
committer | Christian Heim <phreak@gentoo.org> | 2007-11-01 19:09:22 +0000 |
commit | 6ce7b245afd44735a8e04fc565c63bb1be12d95a (patch) | |
tree | 1b1b6a126890742bc27906a6b09cec5d7aac175c /sys-libs/gpm | |
parent | Add ~alpha/~ia64 wrt #197543 (diff) | |
download | gentoo-2-6ce7b245afd44735a8e04fc565c63bb1be12d95a.tar.gz gentoo-2-6ce7b245afd44735a8e04fc565c63bb1be12d95a.tar.bz2 gentoo-2-6ce7b245afd44735a8e04fc565c63bb1be12d95a.zip |
Add patch by Tomas Janousek to fix compilation against linux-headers-2.6.23 (see #195977).
(Portage version: 2.1.3.9)
Diffstat (limited to 'sys-libs/gpm')
-rw-r--r-- | sys-libs/gpm/ChangeLog | 7 | ||||
-rw-r--r-- | sys-libs/gpm/files/gpm-OPEN_MAX.patch | 35 | ||||
-rw-r--r-- | sys-libs/gpm/gpm-1.20.1-r6.ebuild | 3 |
3 files changed, 43 insertions, 2 deletions
diff --git a/sys-libs/gpm/ChangeLog b/sys-libs/gpm/ChangeLog index ceb559de995e..e2431cf51b25 100644 --- a/sys-libs/gpm/ChangeLog +++ b/sys-libs/gpm/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for sys-libs/gpm # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/gpm/ChangeLog,v 1.56 2007/07/07 19:48:14 uberlord Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-libs/gpm/ChangeLog,v 1.57 2007/11/01 19:09:21 phreak Exp $ + + 01 Nov 2007; Christian Heim <phreak@gentoo.org> +files/gpm-OPEN_MAX.patch, + gpm-1.20.1-r6.ebuild: + Add patch by Tomas Janousek to fix compilation against linux-headers-2.6.23 + (see #195977). *gpm-1.20.1-r6 (07 Jul 2007) diff --git a/sys-libs/gpm/files/gpm-OPEN_MAX.patch b/sys-libs/gpm/files/gpm-OPEN_MAX.patch new file mode 100644 index 000000000000..34384ce28624 --- /dev/null +++ b/sys-libs/gpm/files/gpm-OPEN_MAX.patch @@ -0,0 +1,35 @@ +Daemons should always close stdin, stdout and stderr after forking otherwise +the controlling terminal will have issues closing. +Examples include starting over ssh or baselayout-2 +http://bugs.gentoo.org/show_bug.cgi?id=182721 + + +diff --git a/src/prog/gpm-root.y b/src/prog/gpm-root.y +index 3a97602..b496550 100644 +--- a/src/prog/gpm-root.y ++++ b/src/prog/gpm-root.y +@@ -526,7 +526,9 @@ int f_bgcmd(int mode, DrawItem *self, int uid) + open("/dev/null",O_RDONLY); /* stdin */ + open(consolename,O_WRONLY); /* stdout */ + dup(1); /* stderr */ +- for (i=3;i<OPEN_MAX; i++) close(i); ++ int open_max = sysconf(_SC_OPEN_MAX); ++ if (open_max == -1) open_max = 1024; ++ for (i=3;i<open_max; i++) close(i); + execl("/bin/sh","sh","-c",self->arg,(char *)NULL); + exit(1); /* shouldn't happen */ + default: return 0; +diff --git a/src/special.c b/src/special.c +index 5bed91a..c6cd04d 100644 +--- a/src/special.c ++++ b/src/special.c +@@ -156,7 +156,9 @@ int processSpecial(Gpm_Event *event) + open(GPM_NULL_DEV,O_RDONLY); /* stdin */ + open(console.device, O_WRONLY); /* stdout */ + dup(1); /* stderr */ +- for (i=3;i<OPEN_MAX; i++) close(i); ++ int open_max = sysconf(_SC_OPEN_MAX); ++ if (open_max == -1) open_max = 1024; ++ for (i=3;i<open_max; i++) close(i); + execl("/bin/sh","sh","-c",command,(char *)NULL); + exit(1); /* shouldn't happen */
\ No newline at end of file diff --git a/sys-libs/gpm/gpm-1.20.1-r6.ebuild b/sys-libs/gpm/gpm-1.20.1-r6.ebuild index db71761253d7..ec0b80222294 100644 --- a/sys-libs/gpm/gpm-1.20.1-r6.ebuild +++ b/sys-libs/gpm/gpm-1.20.1-r6.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/gpm/gpm-1.20.1-r6.ebuild,v 1.1 2007/07/07 19:48:14 uberlord Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-libs/gpm/gpm-1.20.1-r6.ebuild,v 1.2 2007/11/01 19:09:21 phreak Exp $ # emacs support disabled due to Bug 99533 @@ -29,6 +29,7 @@ src_unpack() { EPATCH_SUFFIX="patch" epatch "${WORKDIR}"/patch epatch "${FILESDIR}"/gpm-configure-LANG.patch epatch "${FILESDIR}"/gpm-daemon.patch + epatch "${FILESDIR}"/gpm-OPEN_MAX.patch } src_compile() { |