Fix Windows build (few warnings and a wrong file descriptor comparison).

This commit is contained in:
Daniel Caujolle-Bert
2025-06-02 17:06:12 +02:00
parent b26e8c3f2f
commit 14ee06fed0
2 changed files with 6 additions and 0 deletions

View File

@@ -161,7 +161,11 @@ bool CLCDproc::open()
/* Create TCP socket */
m_socketfd = socket(clientAddress.ss_family, SOCK_STREAM, 0);
#if defined(_WIN32) || defined(_WIN64)
if (m_socketfd == INVALID_SOCKET) {
#else
if (m_socketfd == -1) {
#endif
LogError("LCDproc, failed to create socket");
return false;
}