From f2d2c9af294654821dbfb6a35261f48190c426c7 Mon Sep 17 00:00:00 2001 From: Alexey Pelykh Date: Thu, 7 Feb 2013 11:43:39 +0200 Subject: [PATCH] Fix for windows ::open --- classpath/java-io.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/classpath/java-io.cpp b/classpath/java-io.cpp index ba4812a5a4..acc0582feb 100644 --- a/classpath/java-io.cpp +++ b/classpath/java-io.cpp @@ -802,7 +802,11 @@ Java_java_io_RandomAccessFile_open(JNIEnv* e, jclass, jstring path, jlong peer = 0; jlong length = 0; #if !defined(WINAPI_FAMILY) || WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) + #if defined(PLATFORM_WINDOWS) + int fd = ::_wopen(chars, O_RDONLY); + #else int fd = ::open((const char*)chars, O_RDONLY); + #endif releaseChars(e, path, chars); if (fd == -1) { throwNewErrno(e, "java/io/IOException");