(UPnP) Disable GetBestRoute for UWP (#13517)

* (UPnP) Disable GetBestRoute for the XBOX

* Macro branching to _WIN32_WINNT_WINXP

* Macro branching to __WINRT__
This commit is contained in:
Cthulhu-throwaway 2022-01-20 02:12:12 -03:00 committed by GitHub
parent f5a1af00eb
commit c9d66eed46
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -20,7 +20,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#if defined(_WIN32) && defined(_MSC_VER)
#if defined(_WIN32) && !defined(__WINRT__) && defined(_MSC_VER)
#pragma comment(lib, "Iphlpapi")
#endif
@ -37,7 +37,7 @@
#include <net/net_natt.h>
#ifdef _WIN32
#if defined(_WIN32) && !defined(__WINRT__)
#include <iphlpapi.h>
#endif
@ -85,7 +85,7 @@ bool natt_init(struct natt_discovery *discovery)
"ST: urn:schemas-upnp-org:device:InternetGatewayDevice:1\r\n"
"MX: 5\r\n"
"\r\n";
#ifdef _WIN32
#if defined(_WIN32) && !defined(__WINRT__)
MIB_IPFORWARDROW ip_forward;
#endif
bool ret;
@ -110,7 +110,7 @@ bool natt_init(struct natt_discovery *discovery)
if (!bind_addr)
goto failure;
#ifdef _WIN32
#if defined(_WIN32) && !defined(__WINRT__)
if (GetBestRoute(inet_addr("223.255.255.255"),
0, &ip_forward) == NO_ERROR)
{