Change in6addr_any to IN6ADDR_ANY_INIT

This prevents glibc export of in6addr_any.

Inspired by: fc6a9f2
Original Author: Cory Fields <cory-nospam-@coryfields.com>
This commit is contained in:
Patrick Lodder 2021-08-29 02:39:10 +02:00
parent a7ed71e78f
commit d8809182e6
No known key found for this signature in database
GPG key ID: 2D3A345B98D0DC1F

View file

@ -1347,7 +1347,7 @@ bool AppInitMain(boost::thread_group& threadGroup, CScheduler& scheduler)
if (!mapMultiArgs.count("-bind") && !mapMultiArgs.count("-whitebind")) {
struct in_addr inaddr_any;
inaddr_any.s_addr = INADDR_ANY;
fBound |= Bind(connman, CService(in6addr_any, GetListenPort()), BF_NONE);
fBound |= Bind(connman, CService((in6_addr)IN6ADDR_ANY_INIT, GetListenPort()), BF_NONE);
fBound |= Bind(connman, CService(inaddr_any, GetListenPort()), !fBound ? BF_REPORT_ERROR : BF_NONE);
}
if (!fBound)