Skip to content

Commit 839c4e7

Browse files
committed
Fix initialization of inaddr_any
1 parent d960a33 commit 839c4e7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/init.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,8 @@ bool AppInit2(int argc, char* argv[])
614614
fBound |= Bind(CService(strBind, GetDefaultPort(), false));
615615
}
616616
} else {
617-
struct in_addr inaddr_any = {s_addr: INADDR_ANY};
617+
struct in_addr inaddr_any;
618+
inaddr_any.s_addr = INADDR_ANY;
618619
fBound |= Bind(CService(inaddr_any, GetDefaultPort()));
619620
#ifdef USE_IPV6
620621
fBound |= Bind(CService(in6addr_any, GetDefaultPort()));

0 commit comments

Comments
 (0)