If AI_CANONNAME or AI_ADDRCONFIG don't exist, set them to zero

If the AI_CANONNAME or AI_ADDRCONFIG flags are missing, just set them
to zero.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
This commit is contained in:
H. Peter Anvin 2008-11-14 08:31:03 -08:00
parent 920b99dfee
commit dd50e8b75c

View file

@ -321,14 +321,6 @@ int getaddrinfo(const char *, const char *, const struct addrinfo *,
void freeaddrinfo(struct addrinfo *); void freeaddrinfo(struct addrinfo *);
const char *gai_strerror(int); const char *gai_strerror(int);
#ifndef AI_CANONNAME
#define AI_CANONNAME 0x0002 /* Request for canonical name. */
#endif
#ifndef AI_ADDRCONFIG
#define AI_ADDRCONFIG 0x0020 /* Use configuration of this host to choose
returned address type.. */
#endif
#ifndef EAI_NONAME #ifndef EAI_NONAME
#define EAI_NONAME -2 /* NAME or SERVICE is unknown. */ #define EAI_NONAME -2 /* NAME or SERVICE is unknown. */
@ -344,6 +336,14 @@ const char *gai_strerror(int);
#endif #endif
#endif #endif
#ifndef AI_CANONNAME
#define AI_CANONNAME 0
#endif
#ifndef AI_ADDRCONFIG
#define AI_ADDRCONFIG 0
#endif
#ifndef INET6_ADDRSTRLEN #ifndef INET6_ADDRSTRLEN
#define INET6_ADDRSTRLEN 46 #define INET6_ADDRSTRLEN 46
#endif #endif