diff options
author | cjihrig <cjihrig@gmail.com> | 2019-07-02 11:07:43 -0400 |
---|---|---|
committer | cjihrig <cjihrig@gmail.com> | 2019-07-02 13:25:23 -0400 |
commit | ea736668500d640783242186334c38a144501961 (patch) | |
tree | 63bc97088e26005076fcbe70a5470668c1929946 /deps/uv/src/unix | |
parent | 5ab24edb025f8433d6f971d1cf8f9c51023a4f63 (diff) | |
download | android-node-v8-ea736668500d640783242186334c38a144501961.tar.gz android-node-v8-ea736668500d640783242186334c38a144501961.tar.bz2 android-node-v8-ea736668500d640783242186334c38a144501961.zip |
deps: upgrade to libuv 1.30.1
This upgrade is a small patch release, fixing compilation
errors on Android, Cygwin, and uClibc - none of which are
tested in the CI.
PR-URL: https://github.com/nodejs/node/pull/28511
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Diffstat (limited to 'deps/uv/src/unix')
-rw-r--r-- | deps/uv/src/unix/cygwin.c | 4 | ||||
-rw-r--r-- | deps/uv/src/unix/thread.c | 18 |
2 files changed, 17 insertions, 5 deletions
diff --git a/deps/uv/src/unix/cygwin.c b/deps/uv/src/unix/cygwin.c index 9da20e203a..6b5cfb7ba5 100644 --- a/deps/uv/src/unix/cygwin.c +++ b/deps/uv/src/unix/cygwin.c @@ -52,3 +52,7 @@ void uv_free_cpu_info(uv_cpu_info_t* cpu_infos, int count) { (void)cpu_infos; (void)count; } + +uint64_t uv_get_constrained_memory(void) { + return 0; /* Memory constraints are unknown. */ +} diff --git a/deps/uv/src/unix/thread.c b/deps/uv/src/unix/thread.c index cd0b7aa6aa..f10c351ebb 100644 --- a/deps/uv/src/unix/thread.c +++ b/deps/uv/src/unix/thread.c @@ -37,7 +37,7 @@ #include <sys/sem.h> #endif -#ifdef __GLIBC__ +#if defined(__GLIBC__) && !defined(__UCLIBC__) #include <gnu/libc-version.h> /* gnu_get_libc_version() */ #endif @@ -222,6 +222,12 @@ int uv_thread_create_ex(uv_thread_t* tid, size_t pagesize; size_t stack_size; + /* Used to squelch a -Wcast-function-type warning. */ + union { + void (*in)(void*); + void* (*out)(void*); + } f; + stack_size = params->flags & UV_THREAD_HAS_STACK_SIZE ? params->stack_size : 0; @@ -248,7 +254,8 @@ int uv_thread_create_ex(uv_thread_t* tid, abort(); } - err = pthread_create(tid, attr, (void*(*)(void*)) entry, arg); + f.in = entry; + err = pthread_create(tid, attr, f.out, arg); if (attr != NULL) pthread_attr_destroy(attr); @@ -474,7 +481,7 @@ int uv_sem_trywait(uv_sem_t* sem) { #else /* !(defined(__APPLE__) && defined(__MACH__)) */ -#ifdef __GLIBC__ +#if defined(__GLIBC__) && !defined(__UCLIBC__) /* Hack around https://sourceware.org/bugzilla/show_bug.cgi?id=12674 * by providing a custom implementation for glibc < 2.21 in terms of other @@ -510,7 +517,8 @@ typedef struct uv_semaphore_s { unsigned int value; } uv_semaphore_t; -#if defined(__GLIBC__) || platform_needs_custom_semaphore +#if (defined(__GLIBC__) && !defined(__UCLIBC__)) || \ + platform_needs_custom_semaphore STATIC_ASSERT(sizeof(uv_sem_t) >= sizeof(uv_semaphore_t*)); #endif @@ -639,7 +647,7 @@ static int uv__sem_trywait(uv_sem_t* sem) { } int uv_sem_init(uv_sem_t* sem, unsigned int value) { -#ifdef __GLIBC__ +#if defined(__GLIBC__) && !defined(__UCLIBC__) uv_once(&glibc_version_check_once, glibc_version_check); #endif |