diff options
author | Max Kellermann <max@duempel.org> | 2015-03-05 08:14:23 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2015-03-05 10:07:07 +0100 |
commit | 5222c684d3000e354579f1b991f621e4c42f8037 (patch) | |
tree | 47ceb5ab918c1f30eff6225f2b0fe1fe9af7487b | |
parent | 5798faa13bf92e7f1f57a15bfd5c85ab2705b004 (diff) | |
download | mpd-5222c684d3000e354579f1b991f621e4c42f8037.tar.gz mpd-5222c684d3000e354579f1b991f621e4c42f8037.tar.xz mpd-5222c684d3000e354579f1b991f621e4c42f8037.zip |
event/ServerSocket: #ifdef out local socket support on Windows
Diffstat (limited to '')
-rw-r--r-- | src/event/ServerSocket.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/event/ServerSocket.cxx b/src/event/ServerSocket.cxx index 9bde636bc..47d692a1c 100644 --- a/src/event/ServerSocket.cxx +++ b/src/event/ServerSocket.cxx @@ -59,7 +59,9 @@ class OneServerSocket final : private SocketMonitor { const unsigned serial; +#ifdef HAVE_UN AllocatedPath path; +#endif SocketAddress address; @@ -69,7 +71,9 @@ public: SocketAddress _address) :SocketMonitor(_loop), parent(_parent), serial(_serial), +#ifdef HAVE_UN path(AllocatedPath::Null()), +#endif address((sockaddr *)xmemdup(_address.GetAddress(), _address.GetSize()), _address.GetSize()) @@ -92,11 +96,13 @@ public: return serial; } +#ifdef HAVE_UN void SetPath(AllocatedPath &&_path) { assert(path.IsNull()); path = std::move(_path); } +#endif bool Open(Error &error); @@ -193,10 +199,12 @@ OneServerSocket::Open(Error &error) if (_fd < 0) return false; +#ifdef HAVE_UN /* allow everybody to connect */ if (!path.IsNull()) chmod(path.c_str(), 0666); +#endif /* register in the EventLoop */ |