(MSVC 2003) Buildfixes

This commit is contained in:
twinaphex 2006-05-18 13:31:43 +02:00
parent acc0856a69
commit b4c1927e27
3 changed files with 16 additions and 6 deletions

View File

@ -85,7 +85,14 @@ static int init_tcp_connection(const struct addrinfo *res,
#if defined(IPPROTO_TCP) && defined(TCP_NODELAY)
{
int flag = 1;
if (setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, (void*)&flag, sizeof(int)) < 0)
if (setsockopt(fd, IPPROTO_TCP, TCP_NODELAY,
#ifdef _WIN32
(const char*)
#else
(const void*)
#endif
&flag,
sizeof(int)) < 0)
RARCH_WARN("Could not set netplay TCP socket to nodelay. Expect jitter.\n");
}
#endif

View File

@ -139,7 +139,14 @@ static bool netplay_net_pre_frame(netplay_t *netplay)
#if defined(IPPROTO_TCP) && defined(TCP_NODELAY)
{
int flag = 1;
if (setsockopt(netplay->fd, IPPROTO_TCP, TCP_NODELAY, (void*)&flag, sizeof(int)) < 0)
if (setsockopt(netplay->fd, IPPROTO_TCP, TCP_NODELAY,
#ifdef _WIN32
(const char*)
#else
(const void*)
#endif
&flag,
sizeof(int)) < 0)
RARCH_WARN("Could not set netplay TCP socket to nodelay. Expect jitter.\n");
}
#endif

View File

@ -30,10 +30,6 @@
#define _WIN32_WINNT 0x0500 //_WIN32_WINNT_WIN2K
#endif
#ifndef _WIN32_IE
#define _WIN32_IE 0x0300
#endif
#include "../../gfx/common/win32_common.h"
#include <windows.h>
#include <commdlg.h>