mirror of
https://git.code.sf.net/p/quake/quakeforge-old
synced 2024-11-10 14:42:06 +00:00
client.h, common.c - now work w/out zlib
net_udp.c - now uses socklen_t, which is guaranteed to be defined
This commit is contained in:
parent
75bb541f81
commit
19773c8525
3 changed files with 19 additions and 4 deletions
|
@ -23,8 +23,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 "zone.h"
|
||||
|
|
|
@ -35,6 +35,16 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
#include "quakedef.h"
|
||||
#endif
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#ifdef HAVE_STRING_H
|
||||
#include <string.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STRINGS_H
|
||||
#include <strings.h>
|
||||
#endif
|
||||
|
||||
void COM_InitFilesystem (void);
|
||||
void COM_Path_f (void);
|
||||
|
||||
|
|
|
@ -222,9 +222,9 @@ qboolean NET_IsClientLegal(netadr_t *adr)
|
|||
|
||||
qboolean NET_GetPacket (void)
|
||||
{
|
||||
int ret;
|
||||
struct sockaddr_in from;
|
||||
int fromlen;
|
||||
int ret;
|
||||
struct sockaddr_in from;
|
||||
socklen_t fromlen;
|
||||
|
||||
fromlen = sizeof(from);
|
||||
ret = recvfrom(net_socket, (void*)net_message_buffer, sizeof(net_message_buffer), 0, (struct sockaddr *)&from, &fromlen);
|
||||
|
@ -332,7 +332,7 @@ void NET_GetLocalAddress (void)
|
|||
{
|
||||
char buff[MAXHOSTNAMELEN];
|
||||
struct sockaddr_in address;
|
||||
int namelen;
|
||||
socklen_t namelen;
|
||||
|
||||
if (gethostname(buff, MAXHOSTNAMELEN) == -1)
|
||||
Sys_Error ("Net_GetLocalAddress: gethostname: %s", strerror(errno));
|
||||
|
|
Loading…
Reference in a new issue