diff --git a/uquake/client.h b/uquake/client.h index 946b6f8..153e25f 100644 --- a/uquake/client.h +++ b/uquake/client.h @@ -22,7 +22,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #ifndef _CLIENT_H #define _CLIENT_H +#include "config.h" + +#ifdef HAS_ZLIB #include +#else +#include "nozip.h" +#endif #include #include diff --git a/uquake/net_dgrm.c b/uquake/net_dgrm.c index 437b3a8..07ef1aa 100644 --- a/uquake/net_dgrm.c +++ b/uquake/net_dgrm.c @@ -64,6 +64,10 @@ unsigned long inet_addr(const char *cp); #include #include +#ifdef HAVE_STRINGS_H +#include +#endif + // these two macros are to make the code more readable #define sfunc net_landrivers[sock->landriver] #define dfunc net_landrivers[net_landriverlevel] diff --git a/uquake/net_udp.c b/uquake/net_udp.c index 86abc5d..6c2c8fc 100644 --- a/uquake/net_udp.c +++ b/uquake/net_udp.c @@ -278,7 +278,7 @@ int UDP_CheckNewConnections (void) int UDP_Read (int socket, byte *buf, int len, struct qsockaddr *addr) { - int addrlen = sizeof (struct qsockaddr); + socklen_t addrlen = sizeof (struct qsockaddr); int ret; ret = recvfrom (socket, buf, len, 0, (struct sockaddr *)addr, &addrlen); @@ -366,7 +366,7 @@ int UDP_StringToAddr (char *string, struct qsockaddr *addr) int UDP_GetSocketAddr (int socket, struct qsockaddr *addr) { - int addrlen = sizeof(struct qsockaddr); + socklen_t addrlen = sizeof(struct qsockaddr); unsigned int a; Q_memset(addr, 0, sizeof(struct qsockaddr)); diff --git a/uquake/sys_unix.c b/uquake/sys_unix.c index daf9d52..54a7868 100644 --- a/uquake/sys_unix.c +++ b/uquake/sys_unix.c @@ -36,6 +36,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # define MAP_FAILED ((void*)-1) #endif +#ifdef HAVE_UNISTD_H +#include +#endif + +#ifdef HAVE_STRINGS_H +#include +#endif + qboolean isDedicated; /* @@ -299,7 +307,7 @@ void Sys_Init(void) int main (int argc, char **argv) { static quakeparms_t parms; - float time, oldtime, newtime; + float oldtime, newtime; parms.memsize = 16*1024*1024; parms.membase = malloc (parms.memsize);