summaryrefslogtreecommitdiff
path: root/package/xfsprogs/patches/120-portability.patch
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2011-02-16 18:20:30 +0000
committerFelix Fietkau <nbd@openwrt.org>2011-02-16 18:20:30 +0000
commitf3fe6605bb79a24f2eaabc2b31afab4c6e4c26b6 (patch)
treec811d94cad5a4ee1aa6933ee12f10b02e2b9314e /package/xfsprogs/patches/120-portability.patch
parent667ac6c97025853f76a2f42ac259487249454247 (diff)
downloadmtk-20170518-f3fe6605bb79a24f2eaabc2b31afab4c6e4c26b6.zip
mtk-20170518-f3fe6605bb79a24f2eaabc2b31afab4c6e4c26b6.tar.gz
mtk-20170518-f3fe6605bb79a24f2eaabc2b31afab4c6e4c26b6.tar.bz2
add a package for xfsprogs
SVN-Revision: 25558
Diffstat (limited to 'package/xfsprogs/patches/120-portability.patch')
-rw-r--r--package/xfsprogs/patches/120-portability.patch39
1 files changed, 39 insertions, 0 deletions
diff --git a/package/xfsprogs/patches/120-portability.patch b/package/xfsprogs/patches/120-portability.patch
new file mode 100644
index 0000000..d8bda81
--- /dev/null
+++ b/package/xfsprogs/patches/120-portability.patch
@@ -0,0 +1,39 @@
+--- a/copy/xfs_copy.c
++++ b/copy/xfs_copy.c
+@@ -463,6 +463,15 @@ read_ag_header(int fd, xfs_agnumber_t ag
+ }
+
+
++static void sig_mask(int type)
++{
++ sigset_t mask;
++ sigemptyset(&mask);
++ sigaddset(&mask, SIGCHLD);
++ sigprocmask(type, &mask, NULL);
++}
++
++
+ void
+ write_wbuf(void)
+ {
+@@ -478,9 +487,9 @@ write_wbuf(void)
+ if (target[i].state != INACTIVE)
+ pthread_mutex_unlock(&targ[i].wait); /* wake up */
+
+- sigrelse(SIGCHLD);
++ sig_mask(SIG_UNBLOCK);
+ pthread_mutex_lock(&mainwait);
+- sighold(SIGCHLD);
++ sig_mask(SIG_BLOCK);
+ }
+
+
+@@ -847,7 +856,7 @@ main(int argc, char **argv)
+ /* set up sigchild signal handler */
+
+ signal(SIGCHLD, handler);
+- sighold(SIGCHLD);
++ sig_mask(SIG_BLOCK);
+
+ /* make children */
+