From 7e2d265fb95b631d07aa81da16fb79cba9285aff Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Mon, 13 May 2013 13:11:12 -0600 Subject: [PATCH] filter flags argument to JVM_Open The class library may pass non-standard flags to JVM_Open which will confuse the OS if we pass them through, so we must filter them out. --- src/classpath-openjdk.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/classpath-openjdk.cpp b/src/classpath-openjdk.cpp index 8fcd6ff7d1..18a507bda3 100644 --- a/src/classpath-openjdk.cpp +++ b/src/classpath-openjdk.cpp @@ -5049,7 +5049,7 @@ EXPORT(JVM_NativePath)(char* path) extern "C" JNIEXPORT jint JNICALL EXPORT(JVM_Open)(const char* path, jint flags, jint mode) { - int r = OPEN(path, flags, mode); + int r = OPEN(path, flags & 0xFFFF, mode); if (r == -1) { return errno == EEXIST ? JVM_EEXIST : -1; } else {