commit:     0bd41cba1a78ddf8f72cddc139b2aff0bd7960b3
Author:     Patrice Clement <monsieurp <AT> gentoo <DOT> org>
AuthorDate: Wed Nov  1 13:28:45 2017 +0000
Commit:     Patrice Clement <monsieurp <AT> gentoo <DOT> org>
CommitDate: Wed Nov  1 13:30:41 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0bd41cba

app-misc/fsniper: patch against obsolete C call.

This patch removes a wait3() call in favour of waitpid() in src/main.c.

Closes: https://bugs.gentoo.org/634366
Package-Manager: Portage-2.3.8, Repoman-2.3.3

 app-misc/fsniper/files/fsniper-1.3.1-waitpid.patch | 15 +++++++++++++++
 app-misc/fsniper/fsniper-1.3.1-r2.ebuild           |  1 +
 2 files changed, 16 insertions(+)

diff --git a/app-misc/fsniper/files/fsniper-1.3.1-waitpid.patch 
b/app-misc/fsniper/files/fsniper-1.3.1-waitpid.patch
new file mode 100644
index 00000000000..1363c4cbf73
--- /dev/null
+++ b/app-misc/fsniper/files/fsniper-1.3.1-waitpid.patch
@@ -0,0 +1,15 @@
+Replace obsolete wait3 by waitpid
+
+--- a/src/main.c
++++ b/src/main.c
+@@ -193,8 +193,8 @@
+ /* handler for reaping children after the fork is done. */
+ void handle_child_signal()
+ {
+-    union wait status;
+-    while (wait3(&status, WNOHANG, 0) > 0) {} 
++    int status;
++    while (waitpid(-1, &status, WNOHANG) > 0) {} 
+ }
+ 
+ /* handler for HUP. reloads the config file. */

diff --git a/app-misc/fsniper/fsniper-1.3.1-r2.ebuild 
b/app-misc/fsniper/fsniper-1.3.1-r2.ebuild
index 55bfb55850f..7b845d7f9bf 100644
--- a/app-misc/fsniper/fsniper-1.3.1-r2.ebuild
+++ b/app-misc/fsniper/fsniper-1.3.1-r2.ebuild
@@ -23,6 +23,7 @@ RDEPEND="
 PATCHES=(
        "${FILESDIR}"/${P}-format-security.patch
        "${FILESDIR}"/${P}-umask.patch
+       "${FILESDIR}"/${P}-waitpid.patch
 )
 
 DOCS=( AUTHORS COPYING NEWS README example.conf )

Reply via email to