Fix conditions for Windows versions below Vista

This commit is contained in:
irwir 2018-08-05 15:20:44 +03:00
parent 5ddf1e7edb
commit a7626af053
1 changed files with 2 additions and 2 deletions

View File

@ -539,7 +539,7 @@ ssdpDiscoverDevices(const char * const deviceTypes[],
/* Get IP associated with the index given in the ip_forward struct
* in order to give this ip to setsockopt(sudp, IPPROTO_IP, IP_MULTICAST_IF) */
if(!ipv6) {
#if _WIN32_WINNT > _WIN32_WINNT_WINXP
#if _WIN32_WINNT >= _WIN32_WINNT_VISTA
IN_ADDR addr;
InetPtonA(AF_INET, "223.255.255.255", &addr);
#else
@ -662,7 +662,7 @@ ssdpDiscoverDevices(const char * const deviceTypes[],
#endif
} else {
struct in_addr mc_if;
#if defined(_WIN32) && (_WIN32_WINNT > _WIN32_WINNT_WINXP)
#if defined(_WIN32) && (_WIN32_WINNT >= _WIN32_WINNT_VISTA)
InetPtonA(AF_INET, multicastif, &mc_if);
#else
mc_if.s_addr = inet_addr(multicastif); /* ex: 192.168.x.x */