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: 07eade8124/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 <cjihrig@gmail.com>
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
This commit is contained in:
Nick Logan 2017-11-08 22:35:46 -05:00 committed by cjihrig
parent c83f8b91af
commit 84fa7fc742
No known key found for this signature in database
GPG Key ID: 7434390BDBE9B9C5

View File

@ -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;