libuv: Update from 1.8.0 to 1.9.0
[termux-packages] / packages / libuv / pthread-sigmask.patch
1 Remove no longer needed workaround which breaks node.js build.
2
3 diff -u -r ../libuv-v1.7.3/include/pthread-fixes.h ./include/pthread-fixes.h
4 --- ../libuv-v1.7.3/include/pthread-fixes.h 2015-08-27 17:42:36.000000000 -0400
5 +++ ./include/pthread-fixes.h 2015-09-08 17:31:47.658023853 -0400
6 @@ -57,16 +57,4 @@
7
8 int pthread_yield(void);
9
10 -/* Workaround pthread_sigmask() returning EINVAL on versions < 4.1 by
11 - * replacing all calls to pthread_sigmask with sigprocmask. See:
12 - * https://android.googlesource.com/platform/bionic/+/9bf330b5
13 - * https://code.google.com/p/android/issues/detail?id=15337
14 - */
15 -int uv__pthread_sigmask(int how, const sigset_t* set, sigset_t* oset);
16 -
17 -#ifdef pthread_sigmask
18 -#undef pthread_sigmask
19 -#endif
20 -#define pthread_sigmask(how, set, oldset) uv__pthread_sigmask(how, set, oldset)
21 -
22 #endif /* GOOGLE_BREAKPAD_COMMON_ANDROID_TESTING_PTHREAD_FIXES_H */
23 diff -u -r ../libuv-v1.7.3/src/unix/pthread-fixes.c ./src/unix/pthread-fixes.c
24 --- ../libuv-v1.7.3/src/unix/pthread-fixes.c 2015-08-27 17:42:36.000000000 -0400
25 +++ ./src/unix/pthread-fixes.c 2015-09-08 17:31:31.562244293 -0400
26 @@ -29,31 +29,6 @@
27 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 */
29
30 -/* Android versions < 4.1 have a broken pthread_sigmask.
31 - * Note that this block of code must come before any inclusion of
32 - * pthread-fixes.h so that the real pthread_sigmask can be referenced.
33 - * */
34 -#include <errno.h>
35 -#include <pthread.h>
36 -#include <signal.h>
37 -
38 -int uv__pthread_sigmask(int how, const sigset_t* set, sigset_t* oset) {
39 - static int workaround;
40 -
41 - if (workaround) {
42 - return sigprocmask(how, set, oset);
43 - } else if (pthread_sigmask(how, set, oset)) {
44 - if (errno == EINVAL && sigprocmask(how, set, oset) == 0) {
45 - workaround = 1;
46 - return 0;
47 - } else {
48 - return -1;
49 - }
50 - } else {
51 - return 0;
52 - }
53 -}
54 -
55 /*Android doesn't provide pthread_barrier_t for now.*/
56 #ifndef PTHREAD_BARRIER_SERIAL_THREAD
57