- replace OPEN_MAX with sysconf(_SC_OPEN_MAX), fixing build with 2.6.23
kernel
This commit is contained in:
parent
1a32313cf8
commit
11b8ab3f77
26
gpm-1.20.1-openmax.patch
Normal file
26
gpm-1.20.1-openmax.patch
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
--- gpm-1.20.1/src/prog/gpm-root.y.openmax 2002-12-24 23:57:16.000000000 +0100
|
||||||
|
+++ gpm-1.20.1/src/prog/gpm-root.y 2007-07-24 20:45:46.000000000 +0200
|
||||||
|
@@ -525,7 +525,9 @@
|
||||||
|
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;
|
||||||
|
--- gpm-1.20.1/src/special.c.openmax 2007-07-24 20:45:46.000000000 +0200
|
||||||
|
+++ gpm-1.20.1/src/special.c 2007-07-24 20:45:46.000000000 +0200
|
||||||
|
@@ -156,7 +156,9 @@
|
||||||
|
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 */
|
||||||
|
|
7
gpm.spec
7
gpm.spec
@ -1,7 +1,7 @@
|
|||||||
Summary: A mouse server for the Linux console.
|
Summary: A mouse server for the Linux console.
|
||||||
Name: gpm
|
Name: gpm
|
||||||
Version: 1.20.1
|
Version: 1.20.1
|
||||||
Release: 86%{?dist}
|
Release: 87%{?dist}
|
||||||
License: GPL
|
License: GPL
|
||||||
Group: System Environment/Daemons
|
Group: System Environment/Daemons
|
||||||
Source: http://ftp.linux.it/pub/People/rubini/gpm/%{name}-%{version}.tar.gz
|
Source: http://ftp.linux.it/pub/People/rubini/gpm/%{name}-%{version}.tar.gz
|
||||||
@ -24,6 +24,7 @@ Patch23: gpm-1.20.1-aligned-sleep.patch
|
|||||||
Patch24: gpm-1.20.1-deadsocket.patch
|
Patch24: gpm-1.20.1-deadsocket.patch
|
||||||
Patch25: gpm-1.20.1-default-handler.patch
|
Patch25: gpm-1.20.1-default-handler.patch
|
||||||
Patch26: gpm-1.20.1-va_list.patch
|
Patch26: gpm-1.20.1-va_list.patch
|
||||||
|
Patch27: gpm-1.20.1-openmax.patch
|
||||||
|
|
||||||
Prereq: /sbin/chkconfig /sbin/ldconfig /sbin/install-info
|
Prereq: /sbin/chkconfig /sbin/ldconfig /sbin/install-info
|
||||||
Requires: bash >= 2.0
|
Requires: bash >= 2.0
|
||||||
@ -72,6 +73,7 @@ mouse button.
|
|||||||
%patch24 -p1 -b .deadsocket
|
%patch24 -p1 -b .deadsocket
|
||||||
%patch25 -p1 -b .default-handler
|
%patch25 -p1 -b .default-handler
|
||||||
%patch26 -p1 -b .va_list
|
%patch26 -p1 -b .va_list
|
||||||
|
%patch27 -p1 -b .openmax
|
||||||
|
|
||||||
%build
|
%build
|
||||||
rm -f configure
|
rm -f configure
|
||||||
@ -191,6 +193,9 @@ fi
|
|||||||
%{_libdir}/libgpm.so
|
%{_libdir}/libgpm.so
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Jul 24 2007 Tomas Janousek <tjanouse@redhat.com> - 1.20.1-87
|
||||||
|
- replace OPEN_MAX with sysconf(_SC_OPEN_MAX), fixing build with 2.6.23 kernel
|
||||||
|
|
||||||
* Tue Jul 24 2007 Tomas Janousek <tjanouse@redhat.com> - 1.20.1-86
|
* Tue Jul 24 2007 Tomas Janousek <tjanouse@redhat.com> - 1.20.1-86
|
||||||
- don't install t-mouse.el, emacs-common contains a newer version,
|
- don't install t-mouse.el, emacs-common contains a newer version,
|
||||||
fixes #249362
|
fixes #249362
|
||||||
|
Loading…
Reference in New Issue
Block a user