From 62595a9b394547bffb8c2965b103bd87dd397e15 Mon Sep 17 00:00:00 2001 From: Mike Morris Date: Tue, 13 Oct 2015 14:27:09 -0400 Subject: [core] bump libuv to 1.7.5 across all platforms UV_ASYNC_PARAMS and UV_TIMER_PARAMS for libuv <= 0.10 compatibility use st_mtim.tv_sec in libuv > 0.10.x --- platform/node/src/node_map.cpp | 14 ++++++++------ platform/node/src/util/async_queue.hpp | 1 - 2 files changed, 8 insertions(+), 7 deletions(-) (limited to 'platform/node') diff --git a/platform/node/src/node_map.cpp b/platform/node/src/node_map.cpp index f1abf48066..bbc3e0658d 100644 --- a/platform/node/src/node_map.cpp +++ b/platform/node/src/node_map.cpp @@ -6,6 +6,12 @@ #include +#if UV_VERSION_MAJOR == 0 && UV_VERSION_MINOR <= 10 +#define UV_ASYNC_PARAMS(handle) uv_async_t *handle, int +#else +#define UV_ASYNC_PARAMS(handle) uv_async_t *handle +#endif + namespace node_mbgl { struct NodeMap::RenderOptions { @@ -335,12 +341,8 @@ NodeMap::NodeMap(v8::Local options) : async(new uv_async_t) { async->data = this; -#if UV_VERSION_MAJOR == 0 && UV_VERSION_MINOR <= 10 - uv_async_init(uv_default_loop(), async, [](uv_async_t *as, int) { -#else - uv_async_init(uv_default_loop(), async, [](uv_async_t *as) { -#endif - reinterpret_cast(as->data)->renderFinished(); + uv_async_init(uv_default_loop(), async, [](UV_ASYNC_PARAMS(handle)) { + reinterpret_cast(handle->data)->renderFinished(); }); // Make sure the async handle doesn't keep the loop alive. diff --git a/platform/node/src/util/async_queue.hpp b/platform/node/src/util/async_queue.hpp index 81319da8c7..b9081b3aeb 100644 --- a/platform/node/src/util/async_queue.hpp +++ b/platform/node/src/util/async_queue.hpp @@ -8,7 +8,6 @@ #include #include - #if UV_VERSION_MAJOR == 0 && UV_VERSION_MINOR <= 10 #define UV_ASYNC_PARAMS(handle) uv_async_t *handle, int #else -- cgit v1.2.1