summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPixel <pixel@nobis-crew.org>2013-01-17 08:01:19 -0800
committerPixel <pixel@nobis-crew.org>2013-01-17 08:59:13 -0800
commit7a8a3636592a80a5094f40ebddaf7233517086fe (patch)
treea1225cb17a3c3a5b87f444818b55e0730feb9de0 /src
parentfcf7b16cbc380b2e4c3a0fdc2e4291fd31b81ba9 (diff)
But the other fields were necessary under MacOS.
Diffstat (limited to 'src')
-rw-r--r--src/Socket.cc4
1 files changed, 4 insertions, 0 deletions
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);