]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
lhnet: make STANDALONETEST actually work again
authorRudolf Polzer <divverent@xonotic.org>
Mon, 12 Aug 2013 06:58:15 +0000 (08:58 +0200)
committerRudolf Polzer <divverent@xonotic.org>
Mon, 12 Aug 2013 07:40:51 +0000 (09:40 +0200)
lhnet.c

diff --git a/lhnet.c b/lhnet.c
index e3bc6b712186f54dd511fd4165ddfc2f54fa3c88..cd77a2fa26148ed3a2754ac22b28469e0f73317f 100644 (file)
--- a/lhnet.c
+++ b/lhnet.c
 #else
 #define Con_Print printf
 #define Con_Printf printf
+#define Con_DPrintf printf
 #define Z_Malloc malloc
 #define Z_Free free
+#define dpsnprintf snprintf
 #endif
 
 #include "lhnet.h"
@@ -435,7 +437,7 @@ int LHNETADDRESS_FromString(lhnetaddress_t *vaddress, const char *string, int de
                a[2] = d3;
                a[3] = d4;
 #ifdef STANDALONETEST
-               LHNETADDRESS_ToString(address, string2, sizeof(string2), 1);
+               LHNETADDRESS_ToString((lhnetaddress_t *)address, string2, sizeof(string2), 1);
                printf("manual parsing of ipv4 dotted decimal address \"%s\" successful: %s\n", string, string2);
 #endif
                return 1;
@@ -510,7 +512,7 @@ int LHNETADDRESS_FromString(lhnetaddress_t *vaddress, const char *string, int de
                        namecache[namecacheposition].address = *address;
                        namecacheposition = (namecacheposition + 1) % MAX_NAMECACHE;
 #ifdef STANDALONETEST
-                       LHNETADDRESS_ToString(address, string2, sizeof(string2), 1);
+                       LHNETADDRESS_ToString((lhnetaddress_t *)address, string2, sizeof(string2), 1);
                        printf("gethostbyname(\"%s\") returned ipv4 address %s\n", string, string2);
 #endif
                        return 1;