Libuv: Compatiblity fix with master

pull/117/merge
Nils Maier 2013-08-11 15:34:32 +02:00
parent 4be7ec380f
commit 90c39522a2
2 changed files with 6 additions and 0 deletions

View File

@ -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

View File

@ -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;