diff options
| author | 2018-07-24 11:01:50 +0100 | |
|---|---|---|
| committer | 2018-07-24 11:05:51 +0100 | |
| commit | 7a24867d97c6ffe75b155d96dedb11b30b904a33 (patch) | |
| tree | 753604a4b12eb8c31c4c2279153365b3e66d9784 /src/socket.cpp | |
| parent | Rename IntModuleList to Module::List. (diff) | |
Fix building on Windows.
Diffstat (limited to 'src/socket.cpp')
| -rw-r--r-- | src/socket.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/socket.cpp b/src/socket.cpp index 1d1103235..5827b8b77 100644 --- a/src/socket.cpp +++ b/src/socket.cpp @@ -93,6 +93,7 @@ int InspIRCd::BindPorts(FailedPortList& failed_ports) continue; } +#ifndef _WIN32 // Are we creating a UNIX listener? const std::string path = tag->getString("path"); if (!path.empty()) @@ -109,13 +110,14 @@ int InspIRCd::BindPorts(FailedPortList& failed_ports) // Create the bindspec manually (aptosa doesn't work with AF_UNIX yet). memset(&bindspec, 0, sizeof(bindspec)); bindspec.un.sun_family = AF_UNIX; - stpncpy(bindspec.un.sun_path, path.c_str(), sizeof(bindspec.un.sun_path) - 1); + memcpy(&bindspec.un.sun_path, path.c_str(), sizeof(bindspec.un.sun_path)); if (!BindPort(tag, bindspec, old_ports)) failed_ports.push_back(std::make_pair(bindspec, errno)); else bound++; } +#endif } std::vector<ListenSocket*>::iterator n = ports.begin(); |
