summaryrefslogtreecommitdiff
path: root/devel/libdaemon
diff options
context:
space:
mode:
authorhasso <hasso@pkgsrc.org>2009-08-18 05:40:44 +0000
committerhasso <hasso@pkgsrc.org>2009-08-18 05:40:44 +0000
commitd8eda3d1dafd59ec069ff1908dc76b5427f4dc4b (patch)
treefbd22974431c52ef6a7bf3150a79545ccaa416a6 /devel/libdaemon
parent60ed06ec73f83b6c59d480623c2359e611deefad (diff)
downloadpkgsrc-d8eda3d1dafd59ec069ff1908dc76b5427f4dc4b.tar.gz
More portable fix for upper bound for signals problem pulled out from
upstream git repo. Should fix build on Solaris, FreeBSD and DragonFly. If there is still need for Darwin specific fix with __DARWIN_NSIG (there is no NSIG or it's semantically different like NSIG and _NSIG in Linux), please add it back.
Diffstat (limited to 'devel/libdaemon')
-rw-r--r--devel/libdaemon/distinfo4
-rw-r--r--devel/libdaemon/patches/patch-aa33
2 files changed, 26 insertions, 11 deletions
diff --git a/devel/libdaemon/distinfo b/devel/libdaemon/distinfo
index 99f6886d0c1..c16523d46fe 100644
--- a/devel/libdaemon/distinfo
+++ b/devel/libdaemon/distinfo
@@ -1,6 +1,6 @@
-$NetBSD: distinfo,v 1.3 2009/08/17 10:26:17 tron Exp $
+$NetBSD: distinfo,v 1.4 2009/08/18 05:40:44 hasso Exp $
SHA1 (libdaemon-0.13.tar.gz) = 2c67eedf0dfe303a86bee64feba3e40d21abbd01
RMD160 (libdaemon-0.13.tar.gz) = 7fc41dc7a147d969b29e5a359442716859de7e0e
Size (libdaemon-0.13.tar.gz) = 368119 bytes
-SHA1 (patch-aa) = 6cb29631560af24ec1c3a362352f02d7ea1327d2
+SHA1 (patch-aa) = 946c837cabafbeb52cb4f615e9f9b2021b475180
diff --git a/devel/libdaemon/patches/patch-aa b/devel/libdaemon/patches/patch-aa
index 2826e62d27e..4cd5ca455a0 100644
--- a/devel/libdaemon/patches/patch-aa
+++ b/devel/libdaemon/patches/patch-aa
@@ -1,15 +1,30 @@
-$NetBSD: patch-aa,v 1.1 2009/08/17 10:26:17 tron Exp $
+$NetBSD: patch-aa,v 1.2 2009/08/18 05:40:44 hasso Exp $
---- libdaemon/dfork.c.orig 2008-07-28 20:37:56.000000000 +0100
-+++ libdaemon/dfork.c 2009-08-17 11:23:13.000000000 +0100
-@@ -662,6 +662,10 @@
- return r;
- }
-
-+#if !defined(_NSIG) && defined(__DARWIN_NSIG)
-+#define _NSIG __DARWIN_NSIG
+http://git.0pointer.de/?p=libdaemon.git;a=commitdiff;h=5b1daf07
+
+--- libdaemon/dfork.c.orig 2008-07-28 22:37:56 +0300
++++ libdaemon/dfork.c 2009-08-18 08:25:30 +0300
+@@ -42,6 +42,14 @@
+ #include "dnonblock.h"
+ #include "dlog.h"
+
++#if defined(_NSIG) /* On glibc NSIG does not count RT signals */
++# define SIGNAL_UPPER_BOUND _NSIG
++#elif defined(NSIG) /* Solaris defines just this */
++# define SIGNAL_UPPER_BOUND NSIG
++#else
++# error "Unknown upper bound for signals"
+#endif
+
+ static int _daemon_retval_pipe[2] = { -1, -1 };
+
+ static int _null_open(int f, int fd) {
+@@ -665,7 +673,7 @@ int daemon_reset_sigs(int except, ...) {
int daemon_reset_sigsv(const int except[]) {
int sig;
+- for (sig = 1; sig < _NSIG; sig++) {
++ for (sig = 1; sig < SIGNAL_UPPER_BOUND; sig++) {
+ int reset = 1;
+
+ switch (sig) {