aboutsummaryrefslogtreecommitdiffstats
path: root/taglib/toolkit
diff options
context:
space:
mode:
authorevpobr <evpobr@users.noreply.github.com>2017-06-08 18:59:14 +0500
committerevpobr <evpobr@users.noreply.github.com>2017-06-08 19:00:37 +0500
commit5ebd3d5276ad86e36fddcb95217f6dbf62746633 (patch)
treeaef27607620f6e7e7754018cf3fe52a0e503b09a /taglib/toolkit
parent4891ee729d5bd98fbe8ff82b89e9758f00d18815 (diff)
Fix WinRT configuring
Don't rely on _WIN32_WINNT value to enable WinRT support. if _WIN32_WINNT is not set manually, it is defaulted to SDK version. So if you use SDK > 8 you cannot use TagLib under Win7 and lower because of CreateFile2 function dependency. PLATFORM_WINRT option (OFF by default) was introduced to enable WinRT build. Related issues: https://github.com/Microsoft/vcpkg/issues/1240
Diffstat (limited to 'taglib/toolkit')
-rw-r--r--taglib/toolkit/tfilestream.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/taglib/toolkit/tfilestream.cpp b/taglib/toolkit/tfilestream.cpp
index 219913af..17a09f3d 100644
--- a/taglib/toolkit/tfilestream.cpp
+++ b/taglib/toolkit/tfilestream.cpp
@@ -51,7 +51,7 @@ namespace
{
const DWORD access = readOnly ? GENERIC_READ : (GENERIC_READ | GENERIC_WRITE);
-#if defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0602)
+#if defined (PLATFORM_WINRT)
return CreateFile2(path.wstr().c_str(), access, FILE_SHARE_READ, OPEN_EXISTING, NULL);
#else
return CreateFileW(path.wstr().c_str(), access, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL);