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