Kaydet (Commit) e9975ecf authored tarafından Michael Stahl's avatar Michael Stahl

sal,sd: use newer InetPtonW API when not building for WinXP target

... i.e. decide based on target instead of SDK version.

Change-Id: I225588d34f961c19e223ed9c1b9a934cd5196cf7
üst 8bb33cb2
......@@ -585,7 +585,7 @@ oslSocketAddr SAL_CALL osl_createInetBroadcastAddr (
if (strDottedAddr && strDottedAddr->length)
{
// the Win32 SDK 8.1 deprecates inet_addr()
#ifdef _WIN32_WINNT_WINBLUE
#if _WIN32_WINNT >= _WIN32_WINNT_VISTA
IN_ADDR addr;
INT ret = InetPtonW(AF_INET, strDottedAddr->buffer, & addr);
if (1 == ret)
......@@ -648,7 +648,7 @@ oslSocketAddr SAL_CALL osl_createInetSocketAddr (
sal_uInt32 Addr;
// the Win32 SDK 8.1 deprecates inet_addr()
#ifdef _WIN32_WINNT_WINBLUE
#if _WIN32_WINNT >= _WIN32_WINNT_VISTA
IN_ADDR addr;
INT ret = InetPtonW(AF_INET, strDottedAddr->buffer, & addr);
Addr = ret == 1 ? addr.S_un.S_addr : OSL_INADDR_NONE;
......
......@@ -123,7 +123,7 @@ void DiscoveryService::setupSockets()
struct ip_mreq multicastRequest;
// the Win32 SDK 8.1 deprecates inet_addr()
#ifdef _WIN32_WINNT_WINBLUE
#if _WIN32_WINNT >= _WIN32_WINNT_VISTA
IN_ADDR addr;
OUString const saddr("239.0.0.1");
INT ret = InetPtonW(AF_INET, saddr.getStr(), & addr);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment