diff --git a/Quake/net_win.c b/Quake/net_win.c index c8b7f558..70d5e37f 100644 --- a/Quake/net_win.c +++ b/Quake/net_win.c @@ -24,7 +24,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "net_loop.h" #include "net_dgrm.h" -#include "net_ser.h" net_driver_t net_drivers[MAX_NET_DRIVERS] = { diff --git a/Quake/net_wins.c b/Quake/net_wins.c index 6ad3463d..3c92cf6a 100644 --- a/Quake/net_wins.c +++ b/Quake/net_wins.c @@ -20,9 +20,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ // net_wins.c +#include "winsock.h" #include "quakedef.h" #include "net_defs.h" -#include "winquake.h" #define MAXHOSTNAMELEN 256 @@ -90,7 +90,7 @@ static void WINS_GetLocalAddress (void) myAddr = *(u_long *)local->h_addr_list[0]; addr = ntohl(myAddr); - sprintf(my_tcpip_address, "%d.%d.%d.%d", (addr >> 24) & 0xff, (addr >> 16) & 0xff, (addr >> 8) & 0xff, addr & 0xff); + sprintf(my_tcpip_address, "%ld.%ld.%ld.%ld", (addr >> 24) & 0xff, (addr >> 16) & 0xff, (addr >> 8) & 0xff, addr & 0xff); } diff --git a/Quake/net_wipx.c b/Quake/net_wipx.c index 6e493569..b172df85 100644 --- a/Quake/net_wipx.c +++ b/Quake/net_wipx.c @@ -20,9 +20,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ // net_wipx.c +#include "winsock.h" #include "quakedef.h" #include "net_defs.h" -#include "winquake.h" #include #include "net_wipx.h" @@ -267,12 +267,12 @@ int WIPX_Write (int handle, byte *buf, int len, struct qsockaddr *addr) int ret; // build packet with sequence number - *(int *)(&packetBuffer[0]) = sequence[handle]; + memcpy(&packetBuffer[0], &sequence[handle], 4); sequence[handle]++; memcpy(&packetBuffer[4], buf, len); len += 4; - ret = sendto (socketid, packetBuffer, len, 0, (struct sockaddr *)addr, sizeof(struct qsockaddr)); + ret = sendto (socketid, (char *)packetBuffer, len, 0, (struct sockaddr *)addr, sizeof(struct qsockaddr)); if (ret == -1) if (WSAGetLastError() == WSAEWOULDBLOCK) return 0; @@ -345,12 +345,12 @@ int WIPX_GetSocketAddr (int handle, struct qsockaddr *addr) { int socketid = ipxsocket[handle]; int addrlen = sizeof(struct qsockaddr); - unsigned int a; Q_memset(addr, 0, sizeof(struct qsockaddr)); if (getsockname(socketid, (struct sockaddr *)addr, &addrlen) != 0) { - int err = WSAGetLastError(); + int err; + err = WSAGetLastError(); /* FIXME: what action should be taken?... */ }