Merge pull request #842 from f1rmb/f1rmb_fix_windows_build

Fix Windows build (few warnings and a wrong file descriptor comparison).
This commit is contained in:
Jonathan Naylor 2025-06-02 16:09:49 +01:00 committed by GitHub
commit 2b69832d16
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 0 deletions

View file

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

View file

@ -1402,7 +1402,9 @@ bool CMMDVMHost::createModem()
std::string uartPort = m_conf.getModemUARTPort(); std::string uartPort = m_conf.getModemUARTPort();
unsigned int uartSpeed = m_conf.getModemUARTSpeed(); unsigned int uartSpeed = m_conf.getModemUARTSpeed();
std::string i2cPort = m_conf.getModemI2CPort(); std::string i2cPort = m_conf.getModemI2CPort();
#if defined(__linux__)
unsigned int i2cAddress = m_conf.getModemI2CAddress(); unsigned int i2cAddress = m_conf.getModemI2CAddress();
#endif
std::string modemAddress = m_conf.getModemModemAddress(); std::string modemAddress = m_conf.getModemModemAddress();
unsigned short modemPort = m_conf.getModemModemPort(); unsigned short modemPort = m_conf.getModemModemPort();
std::string localAddress = m_conf.getModemLocalAddress(); std::string localAddress = m_conf.getModemLocalAddress();