app-misc/fsniper: patch against obsolete C call.
authorPatrice Clement <monsieurp@gentoo.org>
Wed, 1 Nov 2017 13:28:45 +0000 (14:28 +0100)
committerPatrice Clement <monsieurp@gentoo.org>
Wed, 1 Nov 2017 13:30:41 +0000 (14:30 +0100)
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 [new file with mode: 0644]
app-misc/fsniper/fsniper-1.3.1-r2.ebuild

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 (file)
index 0000000..1363c4c
--- /dev/null
@@ -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. */
index 55bfb55850f46439bb4f9dbcb3dba34931cc01de..7b845d7f9bf87da536f8ba2834bbe1bc413d9c29 100644 (file)
@@ -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 )