Skip to content

Commit 0d8d6be

Browse files
committed
Merge #13672: Modified in_addr6 cast in CConman class to work with msvc
822a2a3 Modified in_addr6 cast in CConman class to work with msvc. (Aaron Clauson) Pull request description: Fix to allow net.cpp to compile with MSVC. Without this fix the `(in6_addr)IN6ADDR_ANY_INIT` implicit cast generates a compilation error. Tree-SHA512: f21c5002401dc93564dcf8d49fbafe7c03ad4182df1616d2ee201e2e172f1d696ca7982fb5b42a3b7d6878c8649823044a858401b4172239fb4b0cc2a38db282
2 parents 4c6d1b9 + 822a2a3 commit 0d8d6be

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/net.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2254,7 +2254,8 @@ bool CConnman::InitBinds(const std::vector<CService>& binds, const std::vector<C
22542254
if (binds.empty() && whiteBinds.empty()) {
22552255
struct in_addr inaddr_any;
22562256
inaddr_any.s_addr = INADDR_ANY;
2257-
fBound |= Bind(CService((in6_addr)IN6ADDR_ANY_INIT, GetListenPort()), BF_NONE);
2257+
struct in6_addr inaddr6_any = IN6ADDR_ANY_INIT;
2258+
fBound |= Bind(CService(inaddr6_any, GetListenPort()), BF_NONE);
22582259
fBound |= Bind(CService(inaddr_any, GetListenPort()), !fBound ? BF_REPORT_ERROR : BF_NONE);
22592260
}
22602261
return fBound;

0 commit comments

Comments
 (0)