From 7a8a3636592a80a5094f40ebddaf7233517086fe Mon Sep 17 00:00:00 2001 From: Pixel Date: Thu, 17 Jan 2013 08:01:19 -0800 Subject: But the other fields were necessary under MacOS. --- src/Socket.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/Socket.cc b/src/Socket.cc index 05c5e83..a28b4c1 100644 --- a/src/Socket.cc +++ b/src/Socket.cc @@ -320,6 +320,8 @@ bool Balau::Socket::setLocal(const char * hostname, int port) { struct addrinfo hints; memset(&hints, 0, sizeof(hints)); hints.ai_family = AF_INET6; + hints.ai_socktype = SOCK_STREAM; + hints.ai_protocol = IPPROTO_TCP; hints.ai_flags = AI_V4MAPPED; m_req = resolveName(hostname, NULL, &hints); @@ -377,6 +379,8 @@ bool Balau::Socket::connect(const char * hostname, int port) { struct addrinfo hints; memset(&hints, 0, sizeof(hints)); hints.ai_family = AF_INET6; + hints.ai_socktype = SOCK_STREAM; + hints.ai_protocol = IPPROTO_TCP; hints.ai_flags = AI_V4MAPPED; m_req = resolveName(hostname, NULL, &hints); -- cgit v1.2.3