Skip to content

Commit 2063497

Browse files
committed
define guards to prevent warnings
1 parent d89925f commit 2063497

1 file changed

Lines changed: 16 additions & 4 deletions

File tree

code/qcommon/net_ip.c

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,22 @@ typedef int socklen_t;
4646
typedef unsigned short sa_family_t;
4747
# endif
4848

49-
# define EAGAIN WSAEWOULDBLOCK
50-
# define EADDRNOTAVAIL WSAEADDRNOTAVAIL
51-
# define EAFNOSUPPORT WSAEAFNOSUPPORT
52-
# define ECONNRESET WSAECONNRESET
49+
# ifndef EAGAIN
50+
# define EAGAIN WSAEWOULDBLOCK
51+
# endif
52+
53+
# ifndef EADDRNOTAVAIL
54+
# define EADDRNOTAVAIL WSAEADDRNOTAVAIL
55+
# endif
56+
57+
# ifndef EAFNOSUPPORT
58+
# define EAFNOSUPPORT WSAEAFNOSUPPORT
59+
# endif
60+
61+
# ifndef ECONNRESET
62+
# define ECONNRESET WSAECONNRESET
63+
# endif
64+
5365
typedef u_long ioctlarg_t;
5466
# define socketError WSAGetLastError( )
5567

0 commit comments

Comments
 (0)