mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-17 01:11:45 +00:00
Fix IPv4 interaction
Can now talk to IPv4 hosts again.
This commit is contained in:
parent
878a9cfb6a
commit
87dd61a6f8
1 changed files with 5 additions and 7 deletions
|
@ -457,8 +457,8 @@ UDP_OpenSocket (int port)
|
|||
struct sockaddr_in6 address;
|
||||
struct addrinfo hints, *res;
|
||||
|
||||
#ifdef IPV6_BINDV6ONLY
|
||||
int dummy;
|
||||
#ifdef IPV6_V6ONLY
|
||||
int off = 0;
|
||||
#endif
|
||||
#ifdef _WIN32
|
||||
#define ioctl ioctlsocket
|
||||
|
@ -511,11 +511,9 @@ UDP_OpenSocket (int port)
|
|||
#endif /* _WIN32 */
|
||||
Sys_Error ("UDP_OpenSocket: ioctl FIONBIO: %s", strerror (errno));
|
||||
|
||||
#ifdef IPV6_BINDV6ONLY
|
||||
if (setsockopt (newsocket, IPPROTO_IPV6, IPV6_BINDV6ONLY, &dummy,
|
||||
sizeof (dummy)) < 0) {
|
||||
/* I don't care */
|
||||
}
|
||||
// don't care about the result code
|
||||
#ifdef IPV6_V6ONLY
|
||||
setsockopt (newsocket, IPPROTO_IPV6, IPV6_V6ONLY, &off, sizeof (off));
|
||||
#endif
|
||||
|
||||
if (bind (newsocket, res->ai_addr, res->ai_addrlen) < 0)
|
||||
|
|
Loading…
Reference in a new issue