Fix win32 compilation.

WSASocket return a `INVALID_SOCKET` if something goes wrong,
not SOCKET_ERROR.
This commit is contained in:
Matthieu Gautier 2021-12-23 18:32:43 +01:00
parent 6c95458f5e
commit f1035fa472
1 changed files with 1 additions and 1 deletions

View File

@ -76,7 +76,7 @@ std::map<std::string, std::string> kiwix::getNetworkInterfaces() {
#ifdef _WIN32
SOCKET sd = WSASocket(AF_INET, SOCK_DGRAM, 0, 0, 0, 0);
if (sd == SOCKET_ERROR) {
if (sd == INVALID_SOCKET) {
std::cerr << "Failed to get a socket. Error " << WSAGetLastError() << std::endl;
return interfaces;
}