Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[vcpkg] Fix build on Windows 8.1 SDK #12586

Merged
merged 1 commit into from
Jul 31, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might make sense to just say "2" or copy pasta the implementation from the Microsoft/STL repo.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given that we never actually get here, I'm going to worry about that when we rewrite the Files implementation :P

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