From 20634976e91b1e6380e34735bfc74a18505cc356 Mon Sep 17 00:00:00 2001 From: Tim Angus Date: Mon, 14 Jul 2025 11:55:44 +0100 Subject: [PATCH] define guards to prevent warnings --- code/qcommon/net_ip.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/code/qcommon/net_ip.c b/code/qcommon/net_ip.c index bcccda20..d2efbd37 100644 --- a/code/qcommon/net_ip.c +++ b/code/qcommon/net_ip.c @@ -46,10 +46,22 @@ typedef int socklen_t; typedef unsigned short sa_family_t; # endif -# define EAGAIN WSAEWOULDBLOCK -# define EADDRNOTAVAIL WSAEADDRNOTAVAIL -# define EAFNOSUPPORT WSAEAFNOSUPPORT -# define ECONNRESET WSAECONNRESET +# ifndef EAGAIN +# define EAGAIN WSAEWOULDBLOCK +# endif + +# ifndef EADDRNOTAVAIL +# define EADDRNOTAVAIL WSAEADDRNOTAVAIL +# endif + +# ifndef EAFNOSUPPORT +# define EAFNOSUPPORT WSAEAFNOSUPPORT +# endif + +# ifndef ECONNRESET +# define ECONNRESET WSAECONNRESET +# endif + typedef u_long ioctlarg_t; # define socketError WSAGetLastError( )