RFR (XS) 8221824: Build failure with MSVS 2013 after JDK-8218418
Aleksey Shipilev
shade at redhat.com
Tue Apr 2 11:58:09 UTC 2019
Bug:
https://bugs.openjdk.java.net/browse/JDK-8221824
I understand Oracle is building with newer MSVS. I would like to still maintain the code buildable
with older MSVS-es.
Fix:
diff -r 35794e8db61b src/java.base/windows/native/libnio/fs/WindowsNativeDispatcher.c
--- a/src/java.base/windows/native/libnio/fs/WindowsNativeDispatcher.c Tue Apr 02 10:04:35 2019 +0200
+++ b/src/java.base/windows/native/libnio/fs/WindowsNativeDispatcher.c Tue Apr 02 13:56:19 2019 +0200
@@ -1066,6 +1066,9 @@
// 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
Testing: local Windows build, jdk-submit (running)
--
Thanks,
-Aleksey
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://mail.openjdk.java.net/pipermail/nio-dev/attachments/20190402/c0be4eae/signature.asc>
More information about the nio-dev
mailing list