summaryrefslogtreecommitdiffstats
path: root/Utilities/cmlibuv/src/win/getaddrinfo.c
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-05-08 12:34:46 (GMT)
committerKitware Robot <kwrobot@kitware.com>2018-05-08 12:34:51 (GMT)
commit65431c727b53ff092ad6f2f8c081982bdde52385 (patch)
treec2d84c39997e27f28b54d6722ea52721895a8352 /Utilities/cmlibuv/src/win/getaddrinfo.c
parentd165fd1727c1fdf540f1759583b84110bdc4a2a3 (diff)
parent0d389d175a1c40ac0ae822e1cc638cf15f05a0ce (diff)
downloadCMake-65431c727b53ff092ad6f2f8c081982bdde52385.zip
CMake-65431c727b53ff092ad6f2f8c081982bdde52385.tar.gz
CMake-65431c727b53ff092ad6f2f8c081982bdde52385.tar.bz2
Merge topic 'update-libuv'
0d389d175a libuv: Revert local linux/sparc64 fix now that we have upstream fix 42fbb28516 Merge branch 'upstream-libuv' into update-libuv c8b67ea119 libuv 2018-05-06 (bf605bd7) Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2049
Diffstat (limited to 'Utilities/cmlibuv/src/win/getaddrinfo.c')
-rw-r--r--Utilities/cmlibuv/src/win/getaddrinfo.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/Utilities/cmlibuv/src/win/getaddrinfo.c b/Utilities/cmlibuv/src/win/getaddrinfo.c
index 282d919..5adc766 100644
--- a/Utilities/cmlibuv/src/win/getaddrinfo.c
+++ b/Utilities/cmlibuv/src/win/getaddrinfo.c
@@ -392,15 +392,21 @@ int uv_if_indextoname(unsigned int ifindex, char* buffer, size_t* size) {
DWORD bufsize;
int r;
+ uv__once_init();
+
if (buffer == NULL || size == NULL || *size == 0)
return UV_EINVAL;
- r = ConvertInterfaceIndexToLuid(ifindex, &luid);
+ if (pConvertInterfaceIndexToLuid == NULL)
+ return UV_ENOSYS;
+ r = pConvertInterfaceIndexToLuid(ifindex, &luid);
if (r != 0)
return uv_translate_sys_error(r);
- r = ConvertInterfaceLuidToNameW(&luid, wname, ARRAY_SIZE(wname));
+ if (pConvertInterfaceLuidToNameW == NULL)
+ return UV_ENOSYS;
+ r = pConvertInterfaceLuidToNameW(&luid, wname, ARRAY_SIZE(wname));
if (r != 0)
return uv_translate_sys_error(r);