diff options
author | rpatters1 <rpatters1@users.noreply.github.com> | 2022-07-27 01:51:35 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-27 09:51:35 +0300 |
commit | 5a7e3f08886ef2893148c1342fb6021291cf1307 (patch) | |
tree | 923de9ce9c045e8f2f55a5acb6b1551911521068 /src/wsocket.c | |
parent | d1ad8160cba9e504c9d17665492044a93efdc3ab (diff) | |
download | luasocket-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 '')
-rwxr-xr-x | src/wsocket.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wsocket.c b/src/wsocket.c index 7cd4115..6cb1e41 100755 --- a/src/wsocket.c +++ b/src/wsocket.c | |||
@@ -429,6 +429,6 @@ const char *socket_gaistrerror(int err) { | |||
429 | #ifdef EAI_SYSTEM | 429 | #ifdef EAI_SYSTEM |
430 | case EAI_SYSTEM: return strerror(errno); | 430 | case EAI_SYSTEM: return strerror(errno); |
431 | #endif | 431 | #endif |
432 | default: return gai_strerror(err); | 432 | default: return LUA_GAI_STRERROR(err); |
433 | } | 433 | } |
434 | } | 434 | } |