diff --git a/src/net/AllocatedSocketAddress.cxx b/src/net/AllocatedSocketAddress.cxx
index 6b27e6e26..4ca985d09 100644
--- a/src/net/AllocatedSocketAddress.cxx
+++ b/src/net/AllocatedSocketAddress.cxx
@@ -37,12 +37,6 @@ AllocatedSocketAddress::SetSize(size_type new_size) noexcept
 
 #ifdef HAVE_UN
 
-std::string_view
-AllocatedSocketAddress::GetLocalRaw() const noexcept
-{
-	return SocketAddress(*this).GetLocalRaw();
-}
-
 void
 AllocatedSocketAddress::SetLocal(const char *path) noexcept
 {
diff --git a/src/net/AllocatedSocketAddress.hxx b/src/net/AllocatedSocketAddress.hxx
index 7e8869fbf..76ee3f4f4 100644
--- a/src/net/AllocatedSocketAddress.hxx
+++ b/src/net/AllocatedSocketAddress.hxx
@@ -125,7 +125,9 @@ public:
 	 * @see SocketAddress::GetLocalRaw()
 	 */
 	[[gnu::pure]]
-	std::string_view GetLocalRaw() const noexcept;
+	std::string_view GetLocalRaw() const noexcept {
+		return static_cast<const SocketAddress>(*this).GetLocalRaw();
+	}
 
 	/**
 	 * @see SocketAddress::GetLocalPath()
diff --git a/src/net/StaticSocketAddress.cxx b/src/net/StaticSocketAddress.cxx
index 4510d84b0..36e8bc7f0 100644
--- a/src/net/StaticSocketAddress.cxx
+++ b/src/net/StaticSocketAddress.cxx
@@ -17,16 +17,6 @@ StaticSocketAddress::operator=(SocketAddress other) noexcept
 	return *this;
 }
 
-#ifdef HAVE_UN
-
-std::string_view
-StaticSocketAddress::GetLocalRaw() const noexcept
-{
-	return SocketAddress(*this).GetLocalRaw();
-}
-
-#endif
-
 #ifdef HAVE_TCP
 
 bool
diff --git a/src/net/StaticSocketAddress.hxx b/src/net/StaticSocketAddress.hxx
index 28398f37d..d57dd4ffc 100644
--- a/src/net/StaticSocketAddress.hxx
+++ b/src/net/StaticSocketAddress.hxx
@@ -103,7 +103,9 @@ public:
 	 * @see SocketAddress::GetLocalRaw()
 	 */
 	[[gnu::pure]]
-	std::string_view GetLocalRaw() const noexcept;
+	std::string_view GetLocalRaw() const noexcept {
+		return static_cast<const SocketAddress>(*this).GetLocalRaw();
+	}
 
 	/**
 	 * @see SocketAddress::GetLocalPath()