diff --git a/classpath/java-io.cpp b/classpath/java-io.cpp index 05b54da2c9..f134d6dc0c 100644 --- a/classpath/java-io.cpp +++ b/classpath/java-io.cpp @@ -25,6 +25,7 @@ # include # include +# define ACCESS _waccess # define CLOSE _close # define READ _read # define WRITE _write @@ -56,6 +57,7 @@ typedef wchar_t char_t; # include # include "sys/mman.h" +# define ACCESS access # define OPEN open # define CLOSE close # define READ read @@ -382,7 +384,7 @@ Java_java_io_File_canRead(JNIEnv* e, jclass, jstring path) { string_t chars = getChars(e, path); if (chars) { - int r = access(chars, R_OK); + int r = ACCESS(chars, R_OK); releaseChars(e, path, chars); return (r == 0); } @@ -394,7 +396,7 @@ Java_java_io_File_canWrite(JNIEnv* e, jclass, jstring path) { string_t chars = getChars(e, path); if (chars) { - int r = access(chars, W_OK); + int r = ACCESS(chars, W_OK); releaseChars(e, path, chars); return (r == 0); }