You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-12 13:20:55 +00:00
Bind to IPv4 on OpenBSD when using wildcard
OpenBSD does not support binding on both IPv4 and IPv6 using the same socket
(cherry picked from commit 619e7a2c8b)
This commit is contained in:
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user