make: update patch for SV-41341 to ~git repo version

.. there's no functional difference; I bumped the pkgver anyway.
This commit is contained in:
Ray Donnelly
2014-02-05 22:29:05 +00:00
parent 9841d13dd8
commit 6efb5e12ed
3 changed files with 42 additions and 42 deletions

View File

@@ -1,38 +0,0 @@
diff -urN make.orig/job.c make/job.c
--- make.orig/job.c 2014-01-25 16:59:36.959167700 +0000
+++ make/job.c 2014-01-25 17:04:14.132864300 +0000
@@ -1111,6 +1111,7 @@
sigaction (SIGCLD, &sa, NULL);
#endif
#if defined SIGALRM
+#if 0
if (set_alarm)
{
/* If we're about to enter the read(), set an alarm to wake up in a
@@ -1121,6 +1122,26 @@
sa.sa_flags = 0;
sigaction (SIGALRM, &sa, NULL);
}
+#else /* 0 */
+ /* From http://savannah.gnu.org/bugs/?41341 */
+ if (set_alarm)
+ {
+ if(set_handler)
+ {
+ sa.sa_handler = job_noop;
+ sa.sa_flags = 0;
+ sigaction (SIGALRM, &sa, NULL);
+ alarm (1);
+ }
+ else
+ {
+ alarm (0);
+ sa.sa_handler = SIG_DFL;
+ sa.sa_flags = 0;
+ sigaction (SIGALRM, &sa, NULL);
+ }
+ }
+#endif /* 0 */
#endif
}
#endif

View File

@@ -0,0 +1,38 @@
From 88713683fed38fa5a7a649d065c73f4d945bade7 Mon Sep 17 00:00:00 2001
From: Paul Smith <psmith@gnu.org>
Date: Sat, 1 Feb 2014 23:08:59 -0500
Subject: [PATCH] * job.c (set_child_handler_action_flags): [SV 41341]
Ensure signal handler is in place before alarm(1).
---
job.c | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
diff -urN a/job.c b/job.c
--- a/job.c 2013-10-06 00:12:24.000000000 +0100
+++ b/job.c 2014-02-05 22:19:37.165783500 +0000
@@ -1108,10 +1108,20 @@
/* If we're about to enter the read(), set an alarm to wake up in a
second so we can check if the load has dropped and we can start more
work. On the way out, turn off the alarm and set SIG_DFL. */
- alarm (set_handler ? 1 : 0);
- sa.sa_handler = set_handler ? job_noop : SIG_DFL;
- sa.sa_flags = 0;
- sigaction (SIGALRM, &sa, NULL);
+ if (set_handler)
+ {
+ sa.sa_handler = job_noop;
+ sa.sa_flags = 0;
+ sigaction (SIGALRM, &sa, NULL);
+ alarm (1);
+ }
+ else
+ {
+ alarm (0);
+ sa.sa_handler = SIG_DFL;
+ sa.sa_flags = 0;
+ sigaction (SIGALRM, &sa, NULL);
+ }
}
#endif
}

View File

@@ -3,7 +3,7 @@
pkgname=make
pkgver=4.0
pkgrel=4
pkgrel=5
pkgdesc="GNU make utility to maintain groups of programs"
arch=('i686' 'x86_64')
url="http://www.gnu.org/software/make"
@@ -14,17 +14,17 @@ makedepends=('gettext' 'gettext-devel' 'git' 'wget')
install=$pkgname.install
source=('http://ftp.gnu.org/gnu/make/make-4.0.tar.bz2'
'make-autoconf.patch'
'gnumake-bug-40241.patch'
'0001-job.c-set_child_handler_action_flags-SV-41341.patch'
'gnumake-fix-cast.patch')
md5sums=('571d470a7647b455e3af3f92d79f1c18'
'a81be0be0705d56124534078bbf32700'
'1c24c6bc608a3eb33a1229a04b4674a1'
'425882277ba2874a134897ea39bb88d5'
'77ab9e05b2a056968d1385efc0efa824')
prepare() {
cd ${srcdir}/${pkgname}-${pkgver}
patch -p1 -i ${srcdir}/make-autoconf.patch
patch -p1 -i ${srcdir}/gnumake-bug-40241.patch
patch -p1 -i ${srcdir}/0001-job.c-set_child_handler_action_flags-SV-41341.patch
patch -p1 -i ${srcdir}/gnumake-fix-cast.patch
autoreconf -fi
}