Okay, so I think I found where the problem is.
In IpAddress IpAddress::GetLocalAddress(), it returns prematurely right here:
// Connect the socket to localhost on any port
sockaddr_in address = CreateAddress(ntohl(INADDR_LOOPBACK), 0);
if (connect(sock, reinterpret_cast<sockaddr*>(&address), sizeof(address)) == -1)
{
priv::SocketImpl::Close(sock);
return localAddress;
}
So it looks like it is not the fault of SFML. Anyone know exactly what the problem is?
EDIT: FYI, my system is Windows XP SP2