[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
This commit is contained in:
@@ -24,6 +24,12 @@ namespace po = boost::program_options;
|
||||
#include <cstdlib>
|
||||
#include <iostream>
|
||||
|
||||
#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
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
std::string style_path;
|
||||
double lat = 0, lon = 0;
|
||||
@@ -98,7 +104,7 @@ int main(int argc, char *argv[]) {
|
||||
}
|
||||
|
||||
uv_async_t *async = new uv_async_t;
|
||||
uv_async_init(uv_default_loop(), async, [](uv_async_t *as, int) {
|
||||
uv_async_init(uv_default_loop(), async, [](UV_ASYNC_PARAMS(as)) {
|
||||
std::unique_ptr<const StillImage> image(reinterpret_cast<const StillImage *>(as->data));
|
||||
uv_close(reinterpret_cast<uv_handle_t *>(as), [](uv_handle_t *handle) {
|
||||
delete reinterpret_cast<uv_async_t *>(handle);
|
||||
|
||||
Reference in New Issue
Block a user