Use WINVER values instead of _WIN32_WINNT_[NAME].
WINVER values are well defined, see: https://docs.microsoft.com/en-us/cpp/porting/modifying-winver-and-win32-winnt?view=msvc-160
This commit is contained in:
parent
81029a860b
commit
c1b64740fb
|
@ -56,7 +56,7 @@ int addr_is_reserved(const char * addr_str)
|
||||||
uint32_t addr_n, address;
|
uint32_t addr_n, address;
|
||||||
size_t i;
|
size_t i;
|
||||||
|
|
||||||
#if defined(_WIN32) && (!defined(_WIN32_WINNT_VISTA) || (_WIN32_WINNT < _WIN32_WINNT_VISTA))
|
#if defined(_WIN32) && _WIN32_WINNT < 0x0600 // _WIN32_WINNT_VISTA
|
||||||
addr_n = inet_addr(addr_str);
|
addr_n = inet_addr(addr_str);
|
||||||
if (addr_n == INADDR_NONE)
|
if (addr_n == INADDR_NONE)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
|
@ -460,7 +460,7 @@ parseMSEARCHReply(const char * reply, int size,
|
||||||
static int upnp_gettimeofday(struct timeval * tv)
|
static int upnp_gettimeofday(struct timeval * tv)
|
||||||
{
|
{
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
#if defined(_WIN32_WINNT_VISTA) && (_WIN32_WINNT >= _WIN32_WINNT_VISTA)
|
#if _WIN32_WINNT >= 0x0600 // _WIN32_WINNT_VISTA
|
||||||
ULONGLONG ts = GetTickCount64();
|
ULONGLONG ts = GetTickCount64();
|
||||||
#else
|
#else
|
||||||
DWORD ts = GetTickCount();
|
DWORD ts = GetTickCount();
|
||||||
|
@ -722,7 +722,7 @@ ssdpDiscoverDevices(const char * const deviceTypes[],
|
||||||
} else {
|
} else {
|
||||||
struct in_addr mc_if;
|
struct in_addr mc_if;
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
#if defined(_WIN32_WINNT_VISTA) && (_WIN32_WINNT >= _WIN32_WINNT_VISTA)
|
#if _WIN32_WINNT >= 0x0600 // _WIN32_WINNT_VISTA
|
||||||
InetPtonA(AF_INET, multicastif, &mc_if);
|
InetPtonA(AF_INET, multicastif, &mc_if);
|
||||||
#else
|
#else
|
||||||
mc_if.s_addr = inet_addr(multicastif); /* old Windows SDK do not support InetPtoA() */
|
mc_if.s_addr = inet_addr(multicastif); /* old Windows SDK do not support InetPtoA() */
|
||||||
|
|
Loading…
Reference in New Issue