]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
OpenBSD build changes + little code correction as abs openbsd_build_changes
authorDavid Carlier <devnexen@gmail.com>
Mon, 4 Dec 2017 15:39:31 +0000 (15:39 +0000)
committerDavid Carlier <devnexen@gmail.com>
Mon, 4 Dec 2017 15:39:31 +0000 (15:39 +0000)
accepts integer as parameter

makefile
makefile.inc
netconn.c

index 59504d117a17ed57ba5af39e61300fde1da12569..3a45d7e4129e9596ec9c35f580edd9d4f22d4f6e 100644 (file)
--- 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)
 
index 9c66ed1d946a742459de614624d7acd1d4c5cc74..aba9483b0fcc6b0b815684cd072211f1399ce798 100644 (file)
@@ -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)
 
 
index 342d78b253cdb623d36ad5c1c9fee34b025bf970..98fa0300b9417fc703bfb1116f83135ef3372fd0 100755 (executable)
--- 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)))