From bb08049e669d5658967ec4a9979003d644601530 Mon Sep 17 00:00:00 2001 From: /dev/humancontroller Date: Wed, 18 Mar 2015 19:14:24 +0100 Subject: fix network broadcasting on FreeBSD --- src/qcommon/net_ip.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/qcommon') 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; -- cgit