summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/dns.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dns.cpp b/src/dns.cpp
index 4cf913f3e..a3e1a8b17 100644
--- a/src/dns.cpp
+++ b/src/dns.cpp
@@ -620,7 +620,6 @@ DNSResult DNS::GetResult()
#else
socklen_t x = sizeof(sockaddr_in);
#endif
- char nbuf[MAXBUF];
const char* ipaddr_from;
unsigned short int port_from = 0;
@@ -646,6 +645,7 @@ DNSResult DNS::GetResult()
* -- Thanks jilles for pointing this one out.
*/
#ifdef IPV6
+ char nbuf[MAXBUF];
if (this->socketfamily == AF_INET6)
{
ipaddr_from = inet_ntop(AF_INET6, &((sockaddr_in6*)from)->sin6_addr, nbuf, sizeof(nbuf));