[msan] Fix msan_test broken after r299884.
Bind to ANY as some machines may have IPv6 support but without IPv6 on loopback
interface.
Reviewers: eugenis
Subscribers: llvm-commits
@@ -899,7 +899,7 @@ class SocketAddr4 : public SocketAddr {
memset(&sai_, 0, sizeof(sai_));
sai_.sin_family = AF_INET;
sai_.sin_port = port;
- sai_.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
+ sai_.sin_addr.s_addr = htonl(INADDR_ANY);
}
sockaddr *ptr() override { return reinterpret_cast<sockaddr *>(&sai_); }
@@ -917,7 +917,7 @@ class SocketAddr6 : public SocketAddr {
memset(&sai_, 0, sizeof(sai_));
sai_.sin6_family = AF_INET6;
sai_.sin6_port = port;
- sai_.sin6_addr = in6addr_loopback;
+ sai_.sin6_addr = in6addr_any;
}
sockaddr *ptr() override { return reinterpret_cast<sockaddr *>(&sai_); }
