uv: upgrade to 70381ce
This commit is contained in:
parent
12cf730b69
commit
a7803c58e4
31
deps/uv/src/unix/core.c
vendored
31
deps/uv/src/unix/core.c
vendored
@ -38,18 +38,22 @@
|
|||||||
#include <limits.h> /* PATH_MAX */
|
#include <limits.h> /* PATH_MAX */
|
||||||
#include <sys/uio.h> /* writev */
|
#include <sys/uio.h> /* writev */
|
||||||
|
|
||||||
|
#ifdef __linux__
|
||||||
|
# include <sys/ioctl.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __sun
|
#ifdef __sun
|
||||||
# include <sys/types.h>
|
# include <sys/types.h>
|
||||||
# include <sys/wait.h>
|
# include <sys/wait.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__APPLE__)
|
#ifdef __APPLE__
|
||||||
#include <mach-o/dyld.h> /* _NSGetExecutablePath */
|
# include <mach-o/dyld.h> /* _NSGetExecutablePath */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__FreeBSD__)
|
#ifdef __FreeBSD__
|
||||||
#include <sys/sysctl.h>
|
# include <sys/sysctl.h>
|
||||||
#include <sys/wait.h>
|
# include <sys/wait.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static uv_loop_t default_loop_struct;
|
static uv_loop_t default_loop_struct;
|
||||||
@ -593,7 +597,11 @@ static int uv_getaddrinfo_done(eio_req* req) {
|
|||||||
free(handle->service);
|
free(handle->service);
|
||||||
free(handle->hostname);
|
free(handle->hostname);
|
||||||
|
|
||||||
if (handle->retcode != 0) {
|
if (handle->retcode == 0) {
|
||||||
|
/* OK */
|
||||||
|
} else if (handle->retcode == EAI_NONAME || handle->retcode == EAI_NODATA) {
|
||||||
|
uv__set_sys_error(handle->loop, ENOENT); /* FIXME compatibility hack */
|
||||||
|
} else {
|
||||||
handle->loop->last_err.code = UV_EADDRINFO;
|
handle->loop->last_err.code = UV_EADDRINFO;
|
||||||
handle->loop->last_err.sys_errno_ = handle->retcode;
|
handle->loop->last_err.sys_errno_ = handle->retcode;
|
||||||
}
|
}
|
||||||
@ -734,6 +742,9 @@ int uv__close(int fd) {
|
|||||||
|
|
||||||
|
|
||||||
int uv__nonblock(int fd, int set) {
|
int uv__nonblock(int fd, int set) {
|
||||||
|
#if FIONBIO
|
||||||
|
return ioctl(fd, FIONBIO, &set);
|
||||||
|
#else
|
||||||
int flags;
|
int flags;
|
||||||
|
|
||||||
if ((flags = fcntl(fd, F_GETFL)) == -1) {
|
if ((flags = fcntl(fd, F_GETFL)) == -1) {
|
||||||
@ -751,10 +762,17 @@ int uv__nonblock(int fd, int set) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int uv__cloexec(int fd, int set) {
|
int uv__cloexec(int fd, int set) {
|
||||||
|
#if __linux__
|
||||||
|
/* Linux knows only FD_CLOEXEC so we can safely omit the fcntl(F_GETFD)
|
||||||
|
* syscall. CHECKME: That's probably true for other Unices as well.
|
||||||
|
*/
|
||||||
|
return fcntl(fd, F_SETFD, set ? FD_CLOEXEC : 0);
|
||||||
|
#else
|
||||||
int flags;
|
int flags;
|
||||||
|
|
||||||
if ((flags = fcntl(fd, F_GETFD)) == -1) {
|
if ((flags = fcntl(fd, F_GETFD)) == -1) {
|
||||||
@ -772,6 +790,7 @@ int uv__cloexec(int fd, int set) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
2
deps/uv/src/win/tcp.c
vendored
2
deps/uv/src/win/tcp.c
vendored
@ -1068,4 +1068,4 @@ int uv_tcp_duplicate_socket(uv_tcp_t* handle, int pid,
|
|||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
4
deps/uv/src/win/winsock.h
vendored
4
deps/uv/src/win/winsock.h
vendored
@ -37,6 +37,10 @@
|
|||||||
# define SO_UPDATE_CONNECT_CONTEXT 0x7010
|
# define SO_UPDATE_CONNECT_CONTEXT 0x7010
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef TCP_KEEPALIVE
|
||||||
|
# define TCP_KEEPALIVE 3
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef IPV6_V6ONLY
|
#ifndef IPV6_V6ONLY
|
||||||
#define IPV6_V6ONLY 27
|
#define IPV6_V6ONLY 27
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user