mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-12 18:40:27 +01:00
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.
This commit is contained in:
parent
edda1657fa
commit
a01baba38b
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user