diff options
| author | Fabio Alessandrelli | 2017-01-18 17:17:44 +0100 |
|---|---|---|
| committer | Fabio Alessandrelli | 2017-03-22 21:01:14 +0100 |
| commit | 86de0bd081669c40578b408e2f38fea76b0416ce (patch) | |
| tree | 309cb234fc805dc5c49ddcfc7e704f3702a5baf4 /drivers | |
| parent | d9525082feb6165944082fb80ae7785b23a2250c (diff) | |
| download | godot-86de0bd081669c40578b408e2f38fea76b0416ce.tar.gz godot-86de0bd081669c40578b408e2f38fea76b0416ce.tar.zst godot-86de0bd081669c40578b408e2f38fea76b0416ce.zip | |
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/unix/packet_peer_udp_posix.cpp | 4 | ||||
| -rw-r--r-- | drivers/unix/tcp_server_posix.cpp | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/drivers/unix/packet_peer_udp_posix.cpp b/drivers/unix/packet_peer_udp_posix.cpp index bfbbf6cce..4040aaaf4 100644 --- a/drivers/unix/packet_peer_udp_posix.cpp +++ b/drivers/unix/packet_peer_udp_posix.cpp @@ -127,7 +127,11 @@ Error PacketPeerUDPPosix::listen(int p_port, IP_Address p_bind_address, int p_re ERR_FAIL_COND_V(sockfd != -1, ERR_ALREADY_IN_USE); ERR_FAIL_COND_V(!p_bind_address.is_valid() && !p_bind_address.is_wildcard(), ERR_INVALID_PARAMETER); +#ifdef __OpenBSD__ + sock_type = IP::TYPE_IPV4; // OpenBSD does not support dual stacking, fallback to IPv4 only. +#else sock_type = IP::TYPE_ANY; +#endif if (p_bind_address.is_valid()) sock_type = p_bind_address.is_ipv4() ? IP::TYPE_IPV4 : IP::TYPE_IPV6; diff --git a/drivers/unix/tcp_server_posix.cpp b/drivers/unix/tcp_server_posix.cpp index 6aec5ad31..9049faebb 100644 --- a/drivers/unix/tcp_server_posix.cpp +++ b/drivers/unix/tcp_server_posix.cpp @@ -74,7 +74,11 @@ Error TCPServerPosix::listen(uint16_t p_port, const IP_Address p_bind_address) { ERR_FAIL_COND_V(!p_bind_address.is_valid() && !p_bind_address.is_wildcard(), ERR_INVALID_PARAMETER); int sockfd; +#ifdef __OpenBSD__ + sock_type = IP::TYPE_IPV4; // OpenBSD does not support dual stacking, fallback to IPv4 only. +#else sock_type = IP::TYPE_ANY; +#endif // If the bind address is valid use its type as the socket type if (p_bind_address.is_valid()) |
