diff options
author | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2011-02-16 18:20:30 +0000 |
---|---|---|
committer | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2011-02-16 18:20:30 +0000 |
commit | e6d4f9f8522f7fc132ef307b66e2dbd99454ac4c (patch) | |
tree | 15adbe19ee8e9006efd38400add12503b14a8bf7 /package/xfsprogs/patches/120-portability.patch | |
parent | a32bf38770a694d42d2fb763a3e54df3136ad09d (diff) |
add a package for xfsprogs
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@25558 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/xfsprogs/patches/120-portability.patch')
-rw-r--r-- | package/xfsprogs/patches/120-portability.patch | 39 |
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 0000000000..d8bda81f0d --- /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 */ + |