Skip to content

Commit

Permalink
[vcpkg] Fix build on Windows 8.1 SDK (#12586)
Browse files Browse the repository at this point in the history
  • Loading branch information
strega-nil authored Jul 31, 2020
1 parent f0ae3ef commit 37f7d69
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion toolsrc/src/vcpkg/base/files.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,12 @@ namespace vcpkg::Files
const auto target = read_symlink_implementation(oldpath, ec);
if (ec) return;

const DWORD flags = SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE;
const DWORD flags =
#if defined(SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE)
SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE;
#else
0;
#endif
if (!CreateSymbolicLinkW(newpath.c_str(), target.c_str(), flags))
{
const auto err = GetLastError();
Expand Down

0 comments on commit 37f7d69

Please sign in to comment.