aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/StaticSocketAddress.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2015-07-21 14:42:46 +0200
committerMax Kellermann <max@duempel.org>2015-07-21 14:42:46 +0200
commita4a37d7a196903d73180081159886de214b95849 (patch)
tree5ec463ff1bf80242754b07b5683e439453f6cbac /src/net/StaticSocketAddress.cxx
parentd1b1a8e490415f7b761c50edbfd83218dd177d95 (diff)
downloadmpd-a4a37d7a196903d73180081159886de214b95849.tar.gz
mpd-a4a37d7a196903d73180081159886de214b95849.tar.xz
mpd-a4a37d7a196903d73180081159886de214b95849.zip
net/StaticSocketAddress: remove unused method SetLocal()
Diffstat (limited to 'src/net/StaticSocketAddress.cxx')
-rw-r--r--src/net/StaticSocketAddress.cxx29
1 files changed, 0 insertions, 29 deletions
diff --git a/src/net/StaticSocketAddress.cxx b/src/net/StaticSocketAddress.cxx
index 20dd175c6..27de7f6f5 100644
--- a/src/net/StaticSocketAddress.cxx
+++ b/src/net/StaticSocketAddress.cxx
@@ -32,16 +32,8 @@
#include <algorithm>
-#include <assert.h>
#include <string.h>
-#ifdef WIN32
-#include <ws2tcpip.h>
-#else
-#include <sys/un.h>
-#include <sys/socket.h>
-#endif
-
StaticSocketAddress &
StaticSocketAddress::operator=(SocketAddress other)
{
@@ -56,24 +48,3 @@ StaticSocketAddress::operator==(const StaticSocketAddress &other) const
return size == other.size &&
memcmp(&address, &other.address, size) == 0;
}
-
-#if defined(HAVE_UN) && !defined(__BIONIC__)
-
-void
-StaticSocketAddress::SetLocal(const char *path)
-{
- auto &sun = reinterpret_cast<struct sockaddr_un &>(address);
-
- const size_t path_length = strlen(path);
-
- // TODO: make this a runtime check
- assert(path_length < sizeof(sun.sun_path));
-
- sun.sun_family = AF_LOCAL;
- memcpy(sun.sun_path, path, path_length + 1);
-
- /* note: Bionic doesn't provide SUN_LEN() */
- size = SUN_LEN(&sun);
-}
-
-#endif