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

Commit a696eb0

Browse files
committed
Fix build on Windows with libuv 1.22 and later
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 <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
1 parent 8246487 commit a696eb0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/utilities.cc

+4-1
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,10 @@ void walkHandle(uv_handle_t* h, void* arg) {
417417
// in all current versions of libuv. Once uv_timer_get_timeout is
418418
// in a supported level of libuv we should test for it with dlsym
419419
// and use it instead, in case timeout moves in the future.
420-
#ifdef _WIN32
420+
//
421+
// On Windows in libuv 1.22 and later the `due` member was renamed
422+
// to `timeout` for consistency with the other platforms.
423+
#if defined(_WIN32) && (UV_VERSION_HEX < ((1 << 16) | (22 << 8)))
421424
uint64_t due = handle->timer.due;
422425
#else
423426
uint64_t due = handle->timer.timeout;

0 commit comments

Comments
 (0)