diff options
author | /dev/humancontroller <devhc@example.com> | 2015-03-18 19:14:24 +0100 |
---|---|---|
committer | /dev/humancontroller <devhc@example.com> | 2017-03-09 13:51:06 +0100 |
commit | bb08049e669d5658967ec4a9979003d644601530 (patch) | |
tree | 879dbe88f2105f30c575813b8dc594e200dc16b8 /src | |
parent | d0b72361c847513f27a30f86cb54e9ba9c60c0f6 (diff) |
fix network broadcasting on FreeBSD
Diffstat (limited to 'src')
-rw-r--r-- | src/qcommon/net_ip.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/qcommon/net_ip.c b/src/qcommon/net_ip.c index bb528d99..651fd4d3 100644 --- a/src/qcommon/net_ip.c +++ b/src/qcommon/net_ip.c @@ -214,7 +214,11 @@ static void NetadrToSockadr( netadr_t *a, struct sockaddr *s ) { if( a->type == NA_BROADCAST ) { ((struct sockaddr_in *)s)->sin_family = AF_INET; ((struct sockaddr_in *)s)->sin_port = a->port; +#ifdef __FreeBSD__ + ((struct sockaddr_in *)s)->sin_addr.s_addr = INADDR_ANY; +#else ((struct sockaddr_in *)s)->sin_addr.s_addr = INADDR_BROADCAST; +#endif } else if( a->type == NA_IP ) { ((struct sockaddr_in *)s)->sin_family = AF_INET; |