summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorspecial <special@e03df62e-2008-0410-955e-edbf42e46eb7>2009-08-14 22:02:01 +0000
committerspecial <special@e03df62e-2008-0410-955e-edbf42e46eb7>2009-08-14 22:02:01 +0000
commitfe97bfba2c13020ff4f5b5a777542fe7a783d510 (patch)
tree9f796e9c1d9722adacd306dc4f50b3cecbce02ca /src
parent0740e2b8e5d619bb3babbd143e99d8a77a9062ec (diff)
Fix a compile error for IPv6 windows builds, discovered by Flo
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11519 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/threadengines/threadengine_win32.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/threadengines/threadengine_win32.cpp b/src/threadengines/threadengine_win32.cpp
index 30f65ae74..eb710bbde 100644
--- a/src/threadengines/threadengine_win32.cpp
+++ b/src/threadengines/threadengine_win32.cpp
@@ -112,10 +112,17 @@ SocketThread::SocketThread(InspIRCd* SI)
if (connFD == -1)
throw CoreException("Could not create ITC pipe");
- struct sockaddr_in addr;
+ irc::sockets::insp_sockaddr addr;
+
+#ifdef IPV6
+ irc::sockets::insp_aton("::1", &addr.sin6_addr);
+ addr.sin6_family = AF_INET6;
+ addr.sin6_port = htons(listener->GetPort());
+#else
irc::sockets::insp_aton("127.0.0.1", &addr.sin_addr);
addr.sin_family = AF_INET;
addr.sin_port = htons(listener->GetPort());
+#endif
if (connect(connFD, reinterpret_cast<struct sockaddr*>(&addr), sizeof(addr)) == -1)
{