diff options
| author | fusion32 <marcopuzziello@gmail.com> | 2026-05-28 23:56:29 -0300 |
|---|---|---|
| committer | fusion32 <marcopuzziello@gmail.com> | 2026-05-28 23:56:29 -0300 |
| commit | e2ba7cd29617ae05087ad3d25c55a2eb8ce607a3 (patch) | |
| tree | 2a93ee38c7cc9c83b3b89b3f0f7cbb6fcb8e8b3c /src/communication.cc | |
| parent | d1c4dce3be82aa7e50ddb5b43f15ecc00a16f985 (diff) | |
| download | game-e2ba7cd29617ae05087ad3d25c55a2eb8ce607a3.tar.gz game-e2ba7cd29617ae05087ad3d25c55a2eb8ce607a3.zip | |
fix issues and warnings when compiling with glibc < 2.32 (#57, #58)
This also fixes some inconsistencies such as mixing both strerror
and strerrordesc_np, and possible formatting issues.
Diffstat (limited to 'src/communication.cc')
| -rw-r--r-- | src/communication.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/communication.cc b/src/communication.cc index 2de5e04..e8cf21a 100644 --- a/src/communication.cc +++ b/src/communication.cc @@ -652,7 +652,7 @@ bool CallGameThread(TConnection *Connection){ Connection->WaitingForACK = true; if(tgkill(GetGameProcessID(), GetGameThreadID(), SIGUSR1) == -1){ error("CallGameThread: Can't send SIGUSR1 to thread %d/%d: (%d) %s\n", - GetGameProcessID(), GetGameThreadID(), errno, strerrordesc_np(errno)); + GetGameProcessID(), GetGameThreadID(), errno, GetErrorDescription(errno)); SendLoginMessage(Connection, LOGIN_MESSAGE_ERROR, "The server is not online.\nPlease try again later.", -1); return false; @@ -1489,21 +1489,21 @@ bool OpenSocket(void){ Linger.l_linger = 0; if(setsockopt(TCPSocket, SOL_SOCKET, SO_LINGER, &Linger, sizeof(Linger)) == -1){ error("LaunchServer: Failed to set SO_LINGER=(0, 0): (%d) %s.\n", - errno, strerrordesc_np(errno)); + errno, GetErrorDescription(errno)); return false; } int ReuseAddr = 1; if(setsockopt(TCPSocket, SOL_SOCKET, SO_REUSEADDR, &ReuseAddr, sizeof(ReuseAddr)) == -1){ error("LaunchServer: Failed to set SO_REUSEADDR=1: (%d) %s.\n", - errno, strerrordesc_np(errno)); + errno, GetErrorDescription(errno)); return false; } int NoDelay = 1; if(setsockopt(TCPSocket, IPPROTO_TCP, TCP_NODELAY, &NoDelay, sizeof(NoDelay)) == -1){ error("LaunchServer: Failed to set TCP_NODELAY=1: (%d) %s.\n", - errno, strerrordesc_np(errno)); + errno, GetErrorDescription(errno)); return false; } @@ -1517,7 +1517,7 @@ bool OpenSocket(void){ #endif if(bind(TCPSocket, (struct sockaddr*)&ServerAddress, sizeof(ServerAddress)) == -1){ error("LaunchServer: Failed to bind to acceptor to %s:%d: (%d) %s.\n", - inet_ntoa(ServerAddress.sin_addr), GamePort, errno, strerrordesc_np(errno)); + inet_ntoa(ServerAddress.sin_addr), GamePort, errno, GetErrorDescription(errno)); return false; } |
