mirror of
https://github.com/lunarmodules/luasocket.git
synced 2024-12-25 20:18:21 +01:00
Merge pull request #243 from mojca/eai-undefined
EAI_OVERFLOW, AI_NUMERICSERV: put behind #ifdef so this works on Mac OS X 10.4 and 10.5.
This commit is contained in:
commit
34d525984c
@ -188,7 +188,10 @@ static int meth_sendto(lua_State *L) {
|
||||
memset(&aihint, 0, sizeof(aihint));
|
||||
aihint.ai_family = udp->family;
|
||||
aihint.ai_socktype = SOCK_DGRAM;
|
||||
aihint.ai_flags = AI_NUMERICHOST | AI_NUMERICSERV;
|
||||
aihint.ai_flags = AI_NUMERICHOST;
|
||||
#ifdef AI_NUMERICSERV
|
||||
aihint.ai_flags |= AI_NUMERICSERV;
|
||||
#endif
|
||||
err = getaddrinfo(ip, port, &aihint, &ai);
|
||||
if (err) {
|
||||
lua_pushnil(L);
|
||||
|
@ -440,7 +440,9 @@ LUASOCKET_PRIVATE const char *socket_gaistrerror(int err) {
|
||||
case EAI_FAMILY: return PIE_FAMILY;
|
||||
case EAI_MEMORY: return PIE_MEMORY;
|
||||
case EAI_NONAME: return PIE_NONAME;
|
||||
#ifdef EAI_OVERFLOW
|
||||
case EAI_OVERFLOW: return PIE_OVERFLOW;
|
||||
#endif
|
||||
#ifdef EAI_PROTOCOL
|
||||
case EAI_PROTOCOL: return PIE_PROTOCOL;
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user