mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-27 18:20:27 +00:00
MSVC 2005 Build Fix (#13401)
This commit is contained in:
parent
c4049b9597
commit
c6369b7861
@ -35,9 +35,11 @@
|
||||
|
||||
#include <net/net_natt.h>
|
||||
|
||||
#if !defined(_MSC_VER) || _MSC_VER > 1400
|
||||
#if !defined(HAVE_SOCKET_LEGACY) && defined(_WIN32) && defined(IP_MULTICAST_IF)
|
||||
#include <iphlpapi.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
static natt_state_t natt_st = {{0}, {{0}}, 0, -1};
|
||||
|
||||
@ -56,8 +58,10 @@ bool natt_init(void)
|
||||
"MX: 2\r\n"
|
||||
"ST: urn:schemas-upnp-org:device:InternetGatewayDevice:1\r\n";
|
||||
static struct sockaddr_in msearch_addr = {0};
|
||||
#if !defined(_MSC_VER) || _MSC_VER > 1400
|
||||
#if defined(_WIN32) && defined(IP_MULTICAST_IF)
|
||||
MIB_IPFORWARDROW ip_forward;
|
||||
#endif
|
||||
#endif
|
||||
natt_state_t *st = &natt_st;
|
||||
struct addrinfo *bind_addr = NULL;
|
||||
@ -88,6 +92,7 @@ bool natt_init(void)
|
||||
if (!bind_addr)
|
||||
goto failure;
|
||||
|
||||
#if !defined(_MSC_VER) || _MSC_VER > 1400
|
||||
#if defined(_WIN32) && defined(IP_MULTICAST_IF)
|
||||
if (GetBestRoute(0xDFFFFFFF, 0, &ip_forward) == NO_ERROR)
|
||||
{
|
||||
@ -133,6 +138,7 @@ bool natt_init(void)
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef IP_MULTICAST_TTL
|
||||
{
|
||||
|
@ -41,9 +41,11 @@
|
||||
#include <string/stdstring.h>
|
||||
#include <file/file_path.h>
|
||||
|
||||
#if !defined(_MSC_VER) || _MSC_VER > 1400
|
||||
#if defined(_WIN32) && defined(IP_MULTICAST_IF)
|
||||
#include <iphlpapi.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_DISCORD
|
||||
#include "../discord.h"
|
||||
@ -244,6 +246,7 @@ bool init_netplay_discovery(void)
|
||||
|
||||
if (ret)
|
||||
{
|
||||
#if !defined(_MSC_VER) || _MSC_VER > 1400
|
||||
#if defined(_WIN32) && defined(IP_MULTICAST_IF)
|
||||
MIB_IPFORWARDROW ip_forward;
|
||||
|
||||
@ -291,6 +294,7 @@ bool init_netplay_discovery(void)
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(SOL_SOCKET) && defined(SO_BROADCAST)
|
||||
/* Make it broadcastable */
|
||||
|
Loading…
Reference in New Issue
Block a user