summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Ballier <aballier@gentoo.org>2009-02-11 07:40:38 +0000
committerAlexis Ballier <aballier@gentoo.org>2009-02-11 07:40:38 +0000
commitf4bae023dc65e1f5e8f1427ee2cd2ef6d7aa606e (patch)
tree59b7e73772847a8fe4fd997bb0062dcba16efe15 /dev-libs/libdaemon/files
parent(#258543) Remove duplicate python deps (walch.martin at web.de). (diff)
downloadgentoo-2-f4bae023dc65e1f5e8f1427ee2cd2ef6d7aa606e.tar.gz
gentoo-2-f4bae023dc65e1f5e8f1427ee2cd2ef6d7aa606e.tar.bz2
gentoo-2-f4bae023dc65e1f5e8f1427ee2cd2ef6d7aa606e.zip
add a patch from upstream to fix build on bsd/solaris
(Portage version: 2.2_rc23/cvs/Linux x86_64)
Diffstat (limited to 'dev-libs/libdaemon/files')
-rw-r--r--dev-libs/libdaemon/files/libdaemon-0.13-bsd.patch39
1 files changed, 39 insertions, 0 deletions
diff --git a/dev-libs/libdaemon/files/libdaemon-0.13-bsd.patch b/dev-libs/libdaemon/files/libdaemon-0.13-bsd.patch
new file mode 100644
index 000000000000..8a439d52a62e
--- /dev/null
+++ b/dev-libs/libdaemon/files/libdaemon-0.13-bsd.patch
@@ -0,0 +1,39 @@
+commit 5b1daf072556c1fc9a00e8735fa0cdba280c2231
+Author: Diego 'Flameeyes' Pettenò <flameeyes@gmail.com>
+Date: Wed Oct 1 13:26:32 2008 +0200
+
+ Fix building on OpenSolaris (without _NSIG definition).
+
+ On OpenSolaris, the _NSIG macro is not defined, but NSIG is; as it's
+ not possible to use NSIG under glibc (it would miss the SIGRT*
+ series), define a SIGNAL_UPPER_BOUND depending on the system (and
+ error out if the system lacks both NSIG and _NSIG).
+
+diff --git a/libdaemon/dfork.c b/libdaemon/dfork.c
+index f1ba7c1..6b94944 100644
+--- a/libdaemon/dfork.c
++++ b/libdaemon/dfork.c
+@@ -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) {