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/usocket.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 'src/usocket.c')
| -rw-r--r-- | src/usocket.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) { | |||
| 449 | case EAI_SERVICE: return PIE_SERVICE; | 449 | case EAI_SERVICE: return PIE_SERVICE; |
| 450 | case EAI_SOCKTYPE: return PIE_SOCKTYPE; | 450 | case EAI_SOCKTYPE: return PIE_SOCKTYPE; |
| 451 | case EAI_SYSTEM: return strerror(errno); | 451 | case EAI_SYSTEM: return strerror(errno); |
| 452 | default: return gai_strerror(err); | 452 | default: return LUA_GAI_STRERROR(err); |
| 453 | } | 453 | } |
| 454 | } | 454 | } |
