From ed8b33786be8b332c1938f8da265fdadd4b58b96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6nke=20Ludwig?= Date: Fri, 10 Mar 2017 20:07:04 +0100 Subject: [PATCH] Compile fixes. --- source/vibe/core/net.d | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/source/vibe/core/net.d b/source/vibe/core/net.d index c5cf2be..3cb64a4 100644 --- a/source/vibe/core/net.d +++ b/source/vibe/core/net.d @@ -273,7 +273,7 @@ struct NetworkAddress { case AddressFamily.UNIX: this.family = AddressFamily.UNIX; assert(addr.nameLen >= sockaddr_un.sizeof); - this.sockAddrUnix = *cast(sockaddr_un*)addr.name; + *this.sockAddrUnix = *cast(sockaddr_un*)addr.name; break; } } @@ -378,10 +378,11 @@ struct NetworkAddress { version (Posix) { case AddressFamily.UNIX: import std.traits : hasMember; + import std.string : fromStringz; static if (hasMember!(sockaddr_un, "sun_len")) - sink.formattedWrite("%s",() @trusted { return cast(char[])addr_unix.sun_path[0..addr_unix.sun_len]; } ()); + sink(() @trusted { return cast(char[])addr_unix.sun_path[0..addr_unix.sun_len]; } ()); else - sink.formattedWrite("%s",() @trusted { return (cast(char*)addr_unix.sun_path.ptr).fromStringz; } ()); + sink(() @trusted { return (cast(char*)addr_unix.sun_path.ptr).fromStringz; } ()); break; } }