From 5a7e3f08886ef2893148c1342fb6021291cf1307 Mon Sep 17 00:00:00 2001 From: rpatters1 Date: Wed, 27 Jul 2022 01:51:35 -0500 Subject: fix(build): Use gai_strerrorA not gai_strerror on Windows * Explicitly call gai_strerrorA (for Windows builds), so that the code work correctly in 32bit or 64bit builds. * Implement GAI_STRERROR macro to deal with Windows vs. Non-Windows compiles for 64-bit. * make usocket.c consistent with other modules that call macro GAI_STRERROR * Use different name not just different case for macro wrapping function Co-authored-by: Caleb Maclennan --- src/usocket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/usocket.c') diff --git a/src/usocket.c b/src/usocket.c index acfe186..69635da 100644 --- a/src/usocket.c +++ b/src/usocket.c @@ -449,6 +449,6 @@ const char *socket_gaistrerror(int err) { case EAI_SERVICE: return PIE_SERVICE; case EAI_SOCKTYPE: return PIE_SOCKTYPE; case EAI_SYSTEM: return strerror(errno); - default: return gai_strerror(err); + default: return LUA_GAI_STRERROR(err); } } -- cgit v1.2.3-55-g6feb