From 93949b8b96163777774c09dd93251bf365e5fa38 Mon Sep 17 00:00:00 2001 From: Adam- Date: Fri, 9 Apr 2010 05:03:57 +0000 Subject: Fixed windows compile on new sockets git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2865 5417fbe8-f217-4b02-8779-1006273d7864 --- src/windows.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/windows.cpp b/src/windows.cpp index cfaaa216e..5844ceaf9 100644 --- a/src/windows.cpp +++ b/src/windows.cpp @@ -36,8 +36,8 @@ int inet_pton(int af, const char *src, void *dst) { int address_length; sockaddr_storage sa; - sockaddr_in *sin = static_cast(&sa); - sockaddr_in6 *sin6 = static_cast(&sa); + sockaddr_in *sin = reinterpret_cast(&sa); + sockaddr_in6 *sin6 = reinterpret_cast(&sa); switch (af) { @@ -51,7 +51,7 @@ int inet_pton(int af, const char *src, void *dst) return -1; } - if (WSAStringToAddress(static_cast(src), af, NULL, static_cast(&sa), &address_length) == 0) + if (WSAStringToAddress((LPSTR) src, af, NULL, reinterpret_cast(&sa), &address_length) == 0) { switch (af) { @@ -80,8 +80,8 @@ const char *inet_ntop(int af, const void *src, char *dst, size_t size) int address_length; DWORD string_length = size; sockaddr_storage sa; - sockaddr_in *sin = static_cast(&sa); - sockaddr_in6 *sin6 = static_cast(&sa); + sockaddr_in *sin = reinterpret_cast(&sa); + sockaddr_in6 *sin6 = reinterpret_cast(&sa); memset(&sa, 0, sizeof(sa)); @@ -101,7 +101,7 @@ const char *inet_ntop(int af, const void *src, char *dst, size_t size) return NULL; } - if (WSAAddressToString(static_cast(&sa), address_length, NULL, dst, &string_length) == 0) + if (WSAAddressToString(reinterpret_cast(&sa), address_length, NULL, dst, &string_length) == 0) return dst; return NULL; -- cgit