i_tcp: reset errno in UDP_Bind and SOCK_Send

on non WINSOCK systems
This commit is contained in:
Alug committed 2025-10-29 22:22:14 +01:00
1 parent e97a8ae856
commit 189ef47795
1 file changed
+8
+8
View File
@@ -752,6 +752,10 @@ static void SOCK_Send(void)
int e = 0; // save error code so it can't be modified later code and avoid calling WSAGetLastError() more then once
size_t i, j;
#ifndef USE_WINSOCK
errno = 0;
#endif
if (doomcom->remotenode < 0 || !nodeconnected[doomcom->remotenode])
return;
@@ -840,6 +844,10 @@ static SOCKET_TYPE UDP_Bind(int family, struct sockaddr *addr, socklen_t addrlen
mysockaddr_t straddr;
socklen_t len = sizeof(straddr);
#ifndef USE_WINSOCK
errno = 0;
#endif
if (s == (SOCKET_TYPE)ERRSOCKET)
return (SOCKET_TYPE)ERRSOCKET;