From 84fa7fc7425e1d468a1812e7ab21286024ddd837 Mon Sep 17 00:00:00 2001 From: Nick Logan Date: Wed, 8 Nov 2017 22:35:46 -0500 Subject: [PATCH] win: fix undeclared NDIS_IF_MAX_STRING_SIZE NDIS_IF_MAX_STRING_SIZE does not appear to be available on some Windows systems. This commit defines it using the same logic used by Wireshark. See: https://github.com/boundary/wireshark/blob/07eade8124fd1d5386161591b52e177ee6ea849f/capture_win_ifnames.c#L42-L44 Refs: https://github.com/nodejs/node/pull/16835 Refs: https://github.com/libuv/libuv/pull/1445 PR-URL: https://github.com/libuv/libuv/pull/1623 Reviewed-By: Colin Ihrig Reviewed-By: Bartosz Sosnowski --- src/win/getaddrinfo.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/win/getaddrinfo.c b/src/win/getaddrinfo.c index ab1599d4..282d919c 100644 --- a/src/win/getaddrinfo.c +++ b/src/win/getaddrinfo.c @@ -75,6 +75,9 @@ int uv__getaddrinfo_translate_error(int sys_err) { /* Do we need different versions of this for different architectures? */ #define ALIGNED_SIZE(X) ((((X) + 3) >> 2) << 2) +#ifndef NDIS_IF_MAX_STRING_SIZE +#define NDIS_IF_MAX_STRING_SIZE IF_MAX_STRING_SIZE +#endif static void uv__getaddrinfo_work(struct uv__work* w) { uv_getaddrinfo_t* req;