Only use AI_NUMERICSERV if defined.
This commit is contained in:
parent
907f8c8c49
commit
4a928de402
|
@ -176,8 +176,11 @@ static int _xcb_open_decnet(const char *host, const unsigned short port)
|
||||||
static int _xcb_open_tcp(char *host, const unsigned short port)
|
static int _xcb_open_tcp(char *host, const unsigned short port)
|
||||||
{
|
{
|
||||||
int fd = -1;
|
int fd = -1;
|
||||||
struct addrinfo hints = { AI_ADDRCONFIG | AI_NUMERICSERV, AF_UNSPEC,
|
struct addrinfo hints = { AI_ADDRCONFIG
|
||||||
SOCK_STREAM };
|
#ifdef AI_NUMERICSERV
|
||||||
|
| AI_NUMERICSERV
|
||||||
|
#endif
|
||||||
|
, AF_UNSPEC, SOCK_STREAM };
|
||||||
char service[6]; /* "65535" with the trailing '\0' */
|
char service[6]; /* "65535" with the trailing '\0' */
|
||||||
struct addrinfo *results, *addr;
|
struct addrinfo *results, *addr;
|
||||||
char *bracket;
|
char *bracket;
|
||||||
|
|
Loading…
Reference in New Issue