diff options
Diffstat (limited to 'src/sockets.cpp')
-rw-r--r-- | src/sockets.cpp | 5 |
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(); } |