Commit a01baba3 authored by Luca Boccassi's avatar Luca Boccassi

Problem: test_use_fd_tcp does not work on Solaris

Solution: pass a struct addrinfo hint to getaddrinfo with a hint
about the address family to avoid a failure.
parent edda1657
......@@ -35,8 +35,17 @@
void pre_allocate_sock (void *zmq_socket, const char *address,
const char *port)
{
struct addrinfo *addr;
int rc = getaddrinfo (address, port, NULL, &addr);
struct addrinfo *addr, hint;
hint.ai_flags=0;
hint.ai_family=AF_INET;
hint.ai_socktype=SOCK_STREAM;
hint.ai_protocol=IPPROTO_TCP;
hint.ai_addrlen=0;
hint.ai_canonname=NULL;
hint.ai_addr=NULL;
hint.ai_next=NULL;
int rc = getaddrinfo (address, port, &hint, &addr);
assert (rc == 0);
int s_pre = socket (AF_INET, SOCK_STREAM, IPPROTO_TCP);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment