libuv: update patches

This commit is contained in:
Leonid Pliushch 2020-07-22 19:50:10 +03:00
parent abd4236c29
commit 6ee315200b
2 changed files with 29 additions and 48 deletions

View File

@ -1,9 +1,9 @@
diff -u -r ../libuv-v1.34.0/Makefile.am ./Makefile.am
--- ../libuv-v1.34.0/Makefile.am 2019-12-04 03:11:28.000000000 +0000
+++ ./Makefile.am 2020-01-02 19:24:23.274396000 +0000
@@ -387,14 +387,7 @@
if ANDROID
diff -uNr libuv-v1.38.1/Makefile.am libuv-v1.38.1.mod/Makefile.am
--- libuv-v1.38.1/Makefile.am 2020-07-03 19:51:27.000000000 +0300
+++ libuv-v1.38.1.mod/Makefile.am 2020-07-22 19:44:17.806814523 +0300
@@ -382,13 +382,7 @@
uvinclude_HEADERS += include/uv/android-ifaddrs.h
libuv_la_CFLAGS += -D_GNU_SOURCE
libuv_la_SOURCES += src/unix/android-ifaddrs.c \
- src/unix/linux-core.c \
- src/unix/linux-inotify.c \
@ -11,8 +11,7 @@ diff -u -r ../libuv-v1.34.0/Makefile.am ./Makefile.am
- src/unix/procfs-exepath.c \
- src/unix/pthread-fixes.c \
- src/unix/random-getrandom.c \
- src/unix/random-sysctl-linux.c \
- src/unix/sysinfo-loadavg.c
- src/unix/random-sysctl-linux.c
+ src/unix/pthread-fixes.c
endif

View File

@ -1,46 +1,28 @@
diff -u -r ../libuv-v1.9.1/src/unix/internal.h ./src/unix/internal.h
--- ../libuv-v1.9.1/src/unix/internal.h 2016-05-16 17:22:19.000000000 -0400
+++ ./src/unix/internal.h 2016-05-18 10:48:45.456553752 -0400
@@ -55,14 +55,6 @@
# include <CoreServices/CoreServices.h>
diff -uNr libuv-v1.38.1/src/unix/internal.h libuv-v1.38.1.mod/src/unix/internal.h
--- libuv-v1.38.1/src/unix/internal.h 2020-07-03 19:51:27.000000000 +0300
+++ libuv-v1.38.1.mod/src/unix/internal.h 2020-07-22 19:48:38.768135484 +0300
@@ -70,7 +70,7 @@
# define UV__PATH_MAX 8192
#endif
-#if defined(__ANDROID__)
-int uv__pthread_sigmask(int how, const sigset_t* set, sigset_t* oset);
-# ifdef pthread_sigmask
-# undef pthread_sigmask
-# endif
-# define pthread_sigmask(how, set, oldset) uv__pthread_sigmask(how, set, oldset)
-#endif
-
#define ACCESS_ONCE(type, var) \
(*(volatile type*) &(var))
diff -u -r ../libuv-v1.9.1/src/unix/pthread-fixes.c ./src/unix/pthread-fixes.c
--- ../libuv-v1.9.1/src/unix/pthread-fixes.c 2016-05-16 17:22:19.000000000 -0400
+++ ./src/unix/pthread-fixes.c 2016-05-18 10:47:54.209328719 -0400
@@ -33,24 +33,3 @@
#include <errno.h>
+#if defined(__ANDROID__) && !defined(__TERMUX__)
int uv__pthread_sigmask(int how, const sigset_t* set, sigset_t* oset);
# ifdef pthread_sigmask
# undef pthread_sigmask
diff -uNr libuv-v1.38.1/src/unix/pthread-fixes.c libuv-v1.38.1.mod/src/unix/pthread-fixes.c
--- libuv-v1.38.1/src/unix/pthread-fixes.c 2020-07-03 19:51:27.000000000 +0300
+++ libuv-v1.38.1.mod/src/unix/pthread-fixes.c 2020-07-22 19:47:31.267794580 +0300
@@ -36,6 +36,7 @@
#include <pthread.h>
#include <signal.h>
-
-int uv__pthread_sigmask(int how, const sigset_t* set, sigset_t* oset) {
- static int workaround;
- int err;
-
- if (workaround) {
- return sigprocmask(how, set, oset);
- } else {
- err = pthread_sigmask(how, set, oset);
- if (err) {
- if (err == EINVAL && sigprocmask(how, set, oset) == 0) {
- workaround = 1;
- return 0;
- } else {
- return -1;
- }
- }
- }
-
- return 0;
-}
+#ifndef __TERMUX__
int uv__pthread_sigmask(int how, const sigset_t* set, sigset_t* oset) {
static int workaround;
int err;
@@ -56,3 +57,4 @@
return 0;
}
+#endif