mirror of https://github.com/aria2/aria2
Libuv: Compatiblity fix with master
parent
4be7ec380f
commit
90c39522a2
|
@ -220,6 +220,7 @@ int main() { return uv_poll_init_socket(); }
|
|||
|
||||
if test "x$have_libuv" = "xyes"; then
|
||||
AC_DEFINE([HAVE_LIBUV], [1], [Define to 1 if you have libuv.])
|
||||
AC_CHECK_FUNCS([uv_last_error])
|
||||
elif test "x$with_libuv_requested" = "xyes"; then
|
||||
ARIA2_DEP_NOT_MET([libuv])
|
||||
fi
|
||||
|
|
|
@ -179,9 +179,14 @@ int LibuvEventPoll::translateEvents(EventPoll::EventType events)
|
|||
|
||||
void LibuvEventPoll::pollCallback(KPoll* poll, int status, int events)
|
||||
{
|
||||
#if HAVE_UV_LAST_ERROR
|
||||
if (status == -1) {
|
||||
uv_err_t err = uv_last_error(loop_);
|
||||
switch (err.code) {
|
||||
#else
|
||||
if (status < 0) {
|
||||
switch (status) {
|
||||
#endif
|
||||
case UV_EAGAIN:
|
||||
case UV_EINTR:
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue