mirror of
https://git.code.sf.net/p/quake/quakeforge-old
synced 2024-11-26 05:40:49 +00:00
client.h: Allow build without zlib
net_dgrm.c: Get rid of warnings about unknown functions sys_unix: function warnings, unused variable warning net_udp.c: use socklen_t always (it is guaranteed to be defined)
This commit is contained in:
parent
19773c8525
commit
f7f02c7b58
4 changed files with 21 additions and 3 deletions
|
@ -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 <zlib.h>
|
||||
#else
|
||||
#include "nozip.h"
|
||||
#endif
|
||||
|
||||
#include <qtypes.h>
|
||||
#include <common.h>
|
||||
|
|
|
@ -64,6 +64,10 @@ unsigned long inet_addr(const char *cp);
|
|||
#include <screen.h>
|
||||
#include <keys.h>
|
||||
|
||||
#ifdef HAVE_STRINGS_H
|
||||
#include <strings.h>
|
||||
#endif
|
||||
|
||||
// these two macros are to make the code more readable
|
||||
#define sfunc net_landrivers[sock->landriver]
|
||||
#define dfunc net_landrivers[net_landriverlevel]
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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 <unistd.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STRINGS_H
|
||||
#include <strings.h>
|
||||
#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);
|
||||
|
|
Loading…
Reference in a new issue