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/socket.h | 2 ++ 1 file changed, 2 insertions(+) mode change 100644 => 100755 src/socket.h (limited to 'src/socket.h') diff --git a/src/socket.h b/src/socket.h old mode 100644 new mode 100755 index e541f27..2555bab --- a/src/socket.h +++ b/src/socket.h @@ -16,8 +16,10 @@ \*=========================================================================*/ #ifdef _WIN32 #include "wsocket.h" +#define LUA_GAI_STRERROR gai_strerrorA #else #include "usocket.h" +#define LUA_GAI_STRERROR gai_strerror #endif /*=========================================================================*\ -- cgit v1.2.3-55-g6feb