From: Rudolf Polzer Date: Mon, 12 Aug 2013 06:58:15 +0000 (+0200) Subject: lhnet: make STANDALONETEST actually work again X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=d1bc0cc51c0c3d02876edb46a2e3bf47612d57b6;p=xonotic%2Fdarkplaces.git lhnet: make STANDALONETEST actually work again --- diff --git a/lhnet.c b/lhnet.c index e3bc6b71..cd77a2fa 100644 --- a/lhnet.c +++ b/lhnet.c @@ -50,8 +50,10 @@ #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;