r1344 - in trunk: . code/qcommon
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Sat May 17 06:46:46 EDT 2008
Author: thilo
Date: 2008-05-17 06:46:41 -0400 (Sat, 17 May 2008)
New Revision: 1344
Modified:
trunk/Makefile
trunk/code/qcommon/net_ip.c
Log:
- Workaround for buggy MacOSX getaddrinfo() implementation that doesn't accept AF_UNSPEC parameter in hints structure. Thanks icculus for reporting.
- Add -faltivec flag for debug builds.
Modified: trunk/Makefile
===================================================================
--- trunk/Makefile 2008-05-12 10:49:02 UTC (rev 1343)
+++ trunk/Makefile 2008-05-17 10:46:41 UTC (rev 1344)
@@ -311,7 +311,8 @@
BASE_CFLAGS = -Wall -Wimplicit -Wstrict-prototypes
ifeq ($(ARCH),ppc)
- OPTIMIZE += -faltivec -O3
+ BASE_CFLAGS += -faltivec
+ OPTIMIZE += -O3
endif
ifeq ($(ARCH),i386)
OPTIMIZE += -march=prescott -mfpmath=sse
Modified: trunk/code/qcommon/net_ip.c
===================================================================
--- trunk/code/qcommon/net_ip.c 2008-05-12 10:49:02 UTC (rev 1343)
+++ trunk/code/qcommon/net_ip.c 2008-05-17 10:46:41 UTC (rev 1344)
@@ -266,13 +266,21 @@
static qboolean Sys_StringToSockaddr(const char *s, struct sockaddr *sadr, int sadr_len, sa_family_t family)
{
struct addrinfo hints, *res = NULL, *search;
+ struct addrinfo *hintsp;
int retval;
memset(sadr, '\0', sizeof(*sadr));
memset(&hints, '\0', sizeof(hints));
+
+ // workaround for buggy MacOSX getaddrinfo implementation that doesn't handle AF_UNSPEC in hints correctly.
+ if(family == AF_UNSPEC)
+ hintsp = NULL;
+ else
+ {
+ hintsp = &hints;
+ hintsp->ai_family = family;
+ }
- hints.ai_family = family;
-
retval = getaddrinfo(s, NULL, &hints, &res);
if(!retval)
More information about the quake3-commits
mailing list