Skip to content

Commit d97eeac

Browse files
author
jharrach
committed
fixed: Address insertion type cast compilation error
1 parent 18a2d9a commit d97eeac

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/poll/Address.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,8 +240,9 @@ static std::ostream &operator<<(std::ostream &os, in6_addr const &src) {
240240
unsigned char const *addr = reinterpret_cast<unsigned char const *>(&src);
241241

242242
os << '[';
243-
if ((IN6_IS_ADDR_V4COMPAT(addr) && (addr[12] != 0 || addr[13] != 0)) ||
244-
IN6_IS_ADDR_V4MAPPED(addr)) {
243+
if ((IN6_IS_ADDR_V4COMPAT((in6_addr *)addr) &&
244+
(addr[12] != 0 || addr[13] != 0)) ||
245+
IN6_IS_ADDR_V4MAPPED((in6_addr *)addr)) {
245246
addr[10] == 255 ? os << "::ffff:" : os << "::";
246247
os << *reinterpret_cast<in_addr const *>(&addr[12]);
247248
os << ']';

0 commit comments

Comments
 (0)