aboutsummaryrefslogtreecommitdiff
path: root/src/socket.h
diff options
context:
space:
mode:
authorrpatters1 <rpatters1@users.noreply.github.com>2022-07-27 01:51:35 -0500
committerGitHub <noreply@github.com>2022-07-27 09:51:35 +0300
commit5a7e3f08886ef2893148c1342fb6021291cf1307 (patch)
tree923de9ce9c045e8f2f55a5acb6b1551911521068 /src/socket.h
parentd1ad8160cba9e504c9d17665492044a93efdc3ab (diff)
downloadluasocket-5a7e3f08886ef2893148c1342fb6021291cf1307.tar.gz
luasocket-5a7e3f08886ef2893148c1342fb6021291cf1307.tar.bz2
luasocket-5a7e3f08886ef2893148c1342fb6021291cf1307.zip
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 <caleb@alerque.com>
Diffstat (limited to 'src/socket.h')
-rwxr-xr-x[-rw-r--r--]src/socket.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/socket.h b/src/socket.h
index e541f27..2555bab 100644..100755
--- a/src/socket.h
+++ b/src/socket.h
@@ -16,8 +16,10 @@
16\*=========================================================================*/ 16\*=========================================================================*/
17#ifdef _WIN32 17#ifdef _WIN32
18#include "wsocket.h" 18#include "wsocket.h"
19#define LUA_GAI_STRERROR gai_strerrorA
19#else 20#else
20#include "usocket.h" 21#include "usocket.h"
22#define LUA_GAI_STRERROR gai_strerror
21#endif 23#endif
22 24
23/*=========================================================================*\ 25/*=========================================================================*\