EAI_SYSTEM and ECANCELED are undefined under cygwin; added
conditional #define.
This commit is contained in:
parent
c53ffd5314
commit
e9ecb1b8b0
|
@ -27,6 +27,10 @@ typedef struct errno_info {
|
|||
ikptr c;
|
||||
} errno_info;
|
||||
|
||||
#ifndef ECANCELED
|
||||
#define ECANCELED 140
|
||||
#endif
|
||||
|
||||
static errno_info errno_table[] = {
|
||||
/* errnos from POSIX IEEE Std 1003.1 2004 Edition */
|
||||
{E2BIG, "E2BIG", fix(-1)},
|
||||
|
|
|
@ -57,7 +57,7 @@ getaddrinfo(const char *hostname, const char* servname,
|
|||
memcpy(&sa_in->sin_addr, *ap, sizeof(struct in_addr));
|
||||
r->ai_next = NULL;
|
||||
*res = r;
|
||||
return (0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -40,5 +40,10 @@ getaddrinfo(const char *hostname, const char* servname,
|
|||
extern void
|
||||
freeaddrinfo(struct addrinfo *ai);
|
||||
|
||||
|
||||
#ifndef EAI_SYSTEM
|
||||
# define EAI_SYSTEM 11 /* same code as in glibc */
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue