8221824: Build failure with MSVS 2013 after JDK-8218418
Reviewed-by: stuefe, alanb
--- a/src/java.base/windows/native/libnio/fs/WindowsNativeDispatcher.c Tue Oct 24 10:41:45 2017 +0200
+++ b/src/java.base/windows/native/libnio/fs/WindowsNativeDispatcher.c Tue Apr 02 17:10:09 2019 +0200
@@ -1065,8 +1065,11 @@
// Allow creation of symbolic links when the process is not elevated.
// Developer Mode must be enabled for this option to function, otherwise
- // it will be ignored.
- DWORD dwFlags = (DWORD)flags | SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE;
+ // it will be ignored. Check that symbol is available in current build SDK.
+ DWORD dwFlags = (DWORD)flags;
+#ifdef SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE
+ dwFlags |= SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE;
+#endif
// On Windows 64-bit this appears to succeed even when there are
// insufficient privileges