From 5222c684d3000e354579f1b991f621e4c42f8037 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 5 Mar 2015 08:14:23 +0100 Subject: event/ServerSocket: #ifdef out local socket support on Windows --- src/event/ServerSocket.cxx | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src') 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 */ -- cgit v1.2.3