commit 33d3a3fc930466fb8383d8ec590d750101140d94 parent c92d4030881af827ccbb05ff83c98bc304a7d113 Author: Michael Savage <mikejsavage@gmail.com> Date: Fri Dec 30 00:51:22 +0200 Fix warning Diffstat:
platform_network.h | | | 2 | +- |
win32_network.h | | | 2 | ++ |
diff --git a/platform_network.h b/platform_network.h @@ -62,7 +62,7 @@ inline void sock_init( Socket * sock, IPvX ipvx, TransportProtocol transport, No inline void sock_send_udp( Socket sock, const char * data, size_t len, const sockaddr_in & addr ) { ASSERT( sock.transport == NET_UDP ); - int ok = sendto( sock.fd, data, len, 0, ( sockaddr * ) &addr, sizeof( addr ) ); + ssize_t ok = sendto( sock.fd, data, len, 0, ( sockaddr * ) &addr, sizeof( addr ) ); if( ok == SOCKET_ERROR ) { FATAL( "sendto" ); } diff --git a/win32_network.h b/win32_network.h @@ -3,6 +3,8 @@ #include <winsock2.h> #include <ws2tcpip.h> +typedef int ssize_t; + inline void net_init() { WSADATA wsa_data; if( WSAStartup( MAKEWORD( 2, 2 ), &wsa_data ) == SOCKET_ERROR ) {