diff options
Diffstat (limited to 'src/net')
-rw-r--r-- | src/net/IPv4Address.hxx | 2 | ||||
-rw-r--r-- | src/net/IPv6Address.hxx | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/net/IPv4Address.hxx b/src/net/IPv4Address.hxx index e1ca39dfa..e040c7c5b 100644 --- a/src/net/IPv4Address.hxx +++ b/src/net/IPv4Address.hxx @@ -168,7 +168,7 @@ public: } constexpr operator SocketAddress() const noexcept { - return SocketAddress((const struct sockaddr *)&address, + return SocketAddress((const struct sockaddr *)(const void *)&address, sizeof(address)); } diff --git a/src/net/IPv6Address.hxx b/src/net/IPv6Address.hxx index a2911280a..a3aa695a5 100644 --- a/src/net/IPv6Address.hxx +++ b/src/net/IPv6Address.hxx @@ -135,7 +135,7 @@ public: } constexpr operator SocketAddress() const noexcept { - return SocketAddress((const struct sockaddr *)&address, + return SocketAddress((const struct sockaddr *)(const void *)&address, sizeof(address)); } |