summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2019-03-20 13:06:09 +0100
committerMax Kellermann <max@musicpd.org>2019-03-20 13:06:09 +0100
commit8fc3c5c6123f6d36219e31ad5ef011a8179ed2cd (patch)
tree1d2f1e47f0ed2b4bbfe9b1543a0354fb534268d6 /src
parent4f408bd952e3ddac2168ddbd2ca2c88a561bf91f (diff)
event/ServerSocket: add HAVE_UN check to AddAbstract()
Closes https://github.com/MusicPlayerDaemon/MPD/issues/510
Diffstat (limited to 'src')
-rw-r--r--src/event/ServerSocket.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/event/ServerSocket.cxx b/src/event/ServerSocket.cxx
index 38f84b873..4ff5481e7 100644
--- a/src/event/ServerSocket.cxx
+++ b/src/event/ServerSocket.cxx
@@ -402,6 +402,11 @@ ServerSocket::AddPath(AllocatedPath &&path)
void
ServerSocket::AddAbstract(const char *name)
{
+#if !defined(HAVE_UN)
+ (void)name;
+
+ throw std::runtime_error("Local socket support is disabled");
+#else
assert(name != nullptr);
assert(*name == '@');
@@ -409,6 +414,7 @@ ServerSocket::AddAbstract(const char *name)
address.SetLocal(name);
AddAddress(std::move(address));
+#endif
}
#endif