Enable support for UNIX socket listeners on Windows.

This commit is contained in:
Sadie Powell 2022-04-30 16:11:41 +01:00
parent bba8966e59
commit 0e83e79974
4 changed files with 2 additions and 14 deletions

View File

@ -12,7 +12,7 @@ InspIRCd is supported on the following platforms:
- The most recent three major releases of macOS using the AppleClang 10, Clang 5+, or GCC 7+ (*not* LLVM-GCC) compilers and the GNU toolchain.
- Windows 10 or newer using the MSVC 19.15+ (Visual Studio 15.8 2017) compiler and CMake 3.8 or newer.
- Windows 10 build 17061 or newer using the MSVC 19.15+ (Visual Studio 15.8 2017) compiler and CMake 3.8 or newer.
Alternate platforms and toolchains may also work but are not officially supported by the InspIRCd team. Generally speaking if you are using a reasonably modern UNIX-like system you should be able to build InspIRCd on it.

View File

@ -43,9 +43,7 @@
#include <netdb.h>
#else
#include "inspircd_win32wrapper.h"
# include <afunix.h>
#endif
#include <cerrno>

View File

@ -96,7 +96,6 @@ size_t InspIRCd::BindPorts(FailedPortList& failed_ports)
continue;
}
#ifndef _WIN32
// Are we creating a UNIX listener?
const std::string path = tag->getString("path");
if (!path.empty())
@ -127,7 +126,6 @@ size_t InspIRCd::BindPorts(FailedPortList& failed_ports)
else
bound++;
}
#endif
}
std::vector<ListenSocket*>::iterator n = ports.begin();

View File

@ -182,11 +182,3 @@ inline ssize_t writev(int fd, const WindowsIOVec* iov, int count)
return sent;
return -1;
}
// This wrapper is just so we don't need to do #ifdef _WIN32 everywhere in the socket code. It is
// not actually used and does not need to be the same size as sockaddr_un on UNIX systems.
struct sockaddr_un final
{
ADDRESS_FAMILY sun_family;
char sun_path[6];
};