summaryrefslogtreecommitdiff
path: root/src/sockets.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/sockets.cpp')
-rw-r--r--src/sockets.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/sockets.cpp b/src/sockets.cpp
index ebaf8f5a3..3d2df8dc9 100644
--- a/src/sockets.cpp
+++ b/src/sockets.cpp
@@ -14,10 +14,11 @@
#include "socketengine.h"
#include "logger.h"
+#ifndef _WIN32
#include <arpa/inet.h>
#include <errno.h>
-#include <unistd.h>
#include <fcntl.h>
+#endif
std::map<int, Socket *> SocketEngine::Sockets;
@@ -421,7 +422,7 @@ Socket::Socket(int sock, bool ipv6, int type) : Flags<SocketFlag>(SocketFlagStri
Socket::~Socket()
{
SocketEngine::DelSocket(this);
- close(this->Sock);
+ anope_close(this->Sock);
this->IO->Destroy();
}