From: David Carlier Date: Mon, 4 Dec 2017 15:39:31 +0000 (+0000) Subject: OpenBSD build changes + little code correction as abs X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=refs%2Fmerge-requests%2F44%2Fhead;p=xonotic%2Fdarkplaces.git OpenBSD build changes + little code correction as abs accepts integer as parameter --- diff --git a/makefile b/makefile index 59504d11..3a45d7e4 100644 --- a/makefile +++ b/makefile @@ -208,8 +208,13 @@ endif ifeq ($(DP_MAKE_TARGET), bsd) ifeq ($(DP_ARCH),FreeBSD) DEFAULT_SNDAPI=OSS +else +ifeq ($(DP_ARCH),OpenBSD) + DEFAULT_SNDAPI=NULL + UNIX_X11LIBPATH:=/usr/X11R6/lib else DEFAULT_SNDAPI=BSD +endif endif OBJ_CD=$(OBJ_BSDCD) diff --git a/makefile.inc b/makefile.inc index 9c66ed1d..aba9483b 100644 --- a/makefile.inc +++ b/makefile.inc @@ -269,8 +269,8 @@ LDFLAGS_SUNOSSDL=$(LDFLAGS_UNIXCOMMON) -lrt -ldl -lsocket -lnsl $(LDFLAGS_UNIXSD ##### BSD specific variables ##### # Link -LDFLAGS_BSDCL=$(LDFLAGS_UNIXCOMMON) -lutil $(LDFLAGS_UNIXCL) -LDFLAGS_BSDSV=$(LDFLAGS_UNIXCOMMON) +LDFLAGS_BSDCL=$(LDFLAGS_UNIXCOMMON) -lutil $(LDFLAGS_UNIXCL) -L/usr/local/lib +LDFLAGS_BSDSV=$(LDFLAGS_UNIXCOMMON) -L/usr/local/lib LDFLAGS_BSDSDL=$(LDFLAGS_UNIXCOMMON) $(LDFLAGS_UNIXSDL) diff --git a/netconn.c b/netconn.c index 342d78b2..98fa0300 100755 --- a/netconn.c +++ b/netconn.c @@ -2746,7 +2746,7 @@ static qboolean hmac_mdfour_time_matching(lhnetaddress_t *peeraddress, const cha t1 = (long) time(NULL); t2 = strtol(s, NULL, 0); - if(abs(t1 - t2) > rcon_secure_maxdiff.integer) + if(abs((int)t1 - (int)t2) > rcon_secure_maxdiff.integer) return false; if(!HMAC_MDFOUR_16BYTES((unsigned char *) mdfourbuf, (unsigned char *) s, slen, (unsigned char *) password, (int)strlen(password)))