summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2017-08-10 12:26:15 +0200
committerMax Kellermann <max@musicpd.org>2017-08-10 13:12:13 +0200
commit54de8b8e77c90a42aef8f0ef665caf42c0f1d1b6 (patch)
tree117c2d506d5aa0fb94e0b6187a33d88ef45d34ea /src/net
parent796956970e26e5ea1730d9f070014f592ab9c082 (diff)
net/*, ...: use AF_LOCAL instead of AF_UNIX
Diffstat (limited to 'src/net')
-rw-r--r--src/net/AllocatedSocketAddress.cxx2
-rw-r--r--src/net/ToString.cxx2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/net/AllocatedSocketAddress.cxx b/src/net/AllocatedSocketAddress.cxx
index 1174e14d1..bd4725692 100644
--- a/src/net/AllocatedSocketAddress.cxx
+++ b/src/net/AllocatedSocketAddress.cxx
@@ -82,7 +82,7 @@ AllocatedSocketAddress::SetLocal(const char *path) noexcept
struct sockaddr_un *sun;
SetSize(sizeof(*sun) - sizeof(sun->sun_path) + path_length);
sun = (struct sockaddr_un *)address;
- sun->sun_family = AF_UNIX;
+ sun->sun_family = AF_LOCAL;
memcpy(sun->sun_path, path, path_length);
if (is_abstract)
diff --git a/src/net/ToString.cxx b/src/net/ToString.cxx
index f185a5e2e..98f9f9b10 100644
--- a/src/net/ToString.cxx
+++ b/src/net/ToString.cxx
@@ -116,7 +116,7 @@ std::string
ToString(SocketAddress address) noexcept
{
#ifdef HAVE_UN
- if (address.GetFamily() == AF_UNIX)
+ if (address.GetFamily() == AF_LOCAL)
/* return path of UNIX domain sockets */
return LocalAddressToString(*(const sockaddr_un *)address.GetAddress(),
address.GetSize());