summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2016-02-14 08:33:24 +0000
committerPeter Powell <petpow@saberuk.com>2017-08-06 21:05:50 +0100
commitf2da7dd588adb52148f0cd4779cde29b372cdc2e (patch)
tree510ff17fb08d589cc6a096173a88dd45fe0f5a61 /src
parent02497bfa999da26c19a92d8620c35bb97f1da711 (diff)
Purge code for Windows XP and MSVC pre-2015.
Diffstat (limited to 'src')
-rw-r--r--src/modules/m_dnsbl.cpp2
-rw-r--r--src/modules/m_spanningtree/main.cpp2
-rw-r--r--src/socket.cpp8
3 files changed, 6 insertions, 6 deletions
diff --git a/src/modules/m_dnsbl.cpp b/src/modules/m_dnsbl.cpp
index 752a0d7a5..b2b9c30ff 100644
--- a/src/modules/m_dnsbl.cpp
+++ b/src/modules/m_dnsbl.cpp
@@ -88,7 +88,7 @@ class DNSBLResolver : public DNS::Request
bool match = false;
in_addr resultip;
- inet_aton(ans_record->rdata.c_str(), &resultip);
+ inet_pton(AF_INET, ans_record->rdata.c_str(), &resultip);
switch (ConfEntry->type)
{
diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp
index 6bf9e8044..321ed99b8 100644
--- a/src/modules/m_spanningtree/main.cpp
+++ b/src/modules/m_spanningtree/main.cpp
@@ -209,7 +209,7 @@ void ModuleSpanningTree::ConnectServer(Link* x, Autoconnect* y)
else
{
in_addr n;
- if (inet_aton(x->IPAddr.c_str(),&n) < 1)
+ if (inet_pton(AF_INET, x->IPAddr.c_str(),&n) < 1)
ipvalid = false;
}
diff --git a/src/socket.cpp b/src/socket.cpp
index 17f13bb8a..018e0b0db 100644
--- a/src/socket.cpp
+++ b/src/socket.cpp
@@ -146,13 +146,13 @@ std::string irc::sockets::sockaddrs::addr() const
char addrv[INET6_ADDRSTRLEN+1];
if (sa.sa_family == AF_INET)
{
- if (!inet_ntop(AF_INET, &in4.sin_addr, addrv, sizeof(addrv)))
+ if (!inet_ntop(AF_INET, (void*)&in4.sin_addr, addrv, sizeof(addrv)))
return "";
return addrv;
}
else if (sa.sa_family == AF_INET6)
{
- if (!inet_ntop(AF_INET6, &in6.sin6_addr, addrv, sizeof(addrv)))
+ if (!inet_ntop(AF_INET6, (void*)&in6.sin6_addr, addrv, sizeof(addrv)))
return "";
return addrv;
}
@@ -171,14 +171,14 @@ std::string irc::sockets::sockaddrs::str() const
if (sa.sa_family == AF_INET)
{
char ipaddr[INET_ADDRSTRLEN];
- inet_ntop(AF_INET, &in4.sin_addr, ipaddr, sizeof(ipaddr));
+ inet_ntop(AF_INET, (void*)&in4.sin_addr, ipaddr, sizeof(ipaddr));
return InspIRCd::Format("%s:%u", ipaddr, ntohs(in4.sin_port));
}
if (sa.sa_family == AF_INET6)
{
char ipaddr[INET6_ADDRSTRLEN];
- inet_ntop(AF_INET6, &in6.sin6_addr, ipaddr, sizeof(ipaddr));
+ inet_ntop(AF_INET6, (void*)&in6.sin6_addr, ipaddr, sizeof(ipaddr));
return InspIRCd::Format("[%s]:%u", ipaddr, ntohs(in6.sin6_port));
}