Author: ag Date: 2007-12-12 00:50:00 -0700 (Wed, 12 Dec 2007) New Revision: 1882
Added: trunk/gpm/gpm-1.20.1-openmax-1.patch Log: Let gpm build against 2.6.23 kernel Added: trunk/gpm/gpm-1.20.1-openmax-1.patch =================================================================== --- trunk/gpm/gpm-1.20.1-openmax-1.patch (rev 0) +++ trunk/gpm/gpm-1.20.1-openmax-1.patch 2007-12-12 07:50:00 UTC (rev 1882) @@ -0,0 +1,32 @@ +Submitted By: Agathoklis Hatzimanikas (ag at linuxfromscratch dot org) +Date: 2007-12-12 +Initial Package Version: 1.20.1 +Origin: Fedora. +Upstream Status: Reported http://lists.linux.it/pipermail/gpm/2007-July/000925.html +Description: Let gpm build against 2.6.23 kernel. + +--- 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 */ -- http://linuxfromscratch.org/mailman/listinfo/patches FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page
