Skip to content
This repository has been archived by the owner on Jun 18, 2021. It is now read-only.

Commit

Permalink
Fix build on Windows with libuv 1.22 and later
Browse files Browse the repository at this point in the history
On Windows in libuv 1.22 and later the `due` member was renamed
to `timeout` for consistency with the other platforms.

PR-URL: #118
Fixes: #113
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
  • Loading branch information
richardlau committed Jan 22, 2019
1 parent 8246487 commit a696eb0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/utilities.cc
Expand Up @@ -417,7 +417,10 @@ void walkHandle(uv_handle_t* h, void* arg) {
// in all current versions of libuv. Once uv_timer_get_timeout is
// in a supported level of libuv we should test for it with dlsym
// and use it instead, in case timeout moves in the future.
#ifdef _WIN32
//
// On Windows in libuv 1.22 and later the `due` member was renamed
// to `timeout` for consistency with the other platforms.
#if defined(_WIN32) && (UV_VERSION_HEX < ((1 << 16) | (22 << 8)))
uint64_t due = handle->timer.due;
#else
uint64_t due = handle->timer.timeout;
Expand Down

0 comments on commit a696eb0

Please sign in to comment.