--- a/jdk/src/java.base/unix/native/libnio/fs/UnixNativeDispatcher.c Thu Sep 08 22:14:00 2016 +0000
+++ b/jdk/src/java.base/unix/native/libnio/fs/UnixNativeDispatcher.c Wed Sep 07 14:44:59 2016 -0700
@@ -52,6 +52,10 @@
#include <strings.h>
#endif
+#ifdef __linux__
+#include <sys/syscall.h>
+#endif
+
#if defined(__linux__) || defined(_AIX)
#include <string.h>
#endif
@@ -157,14 +161,11 @@
}
#endif
-#if defined(__linux__) && defined(__x86_64__)
+#if defined(__linux__) && defined(_LP64) && defined(__NR_newfstatat)
#define FSTATAT64_SYSCALL_AVAILABLE
static int fstatat64_wrapper(int dfd, const char *path,
struct stat64 *statbuf, int flag)
{
- #ifndef __NR_newfstatat
- #define __NR_newfstatat 262
- #endif
return syscall(__NR_newfstatat, dfd, path, statbuf, flag);
}
#endif
--- a/jdk/test/java/nio/file/DirectoryStream/SecureDS.java Thu Sep 08 22:14:00 2016 +0000
+++ b/jdk/test/java/nio/file/DirectoryStream/SecureDS.java Wed Sep 07 14:44:59 2016 -0700
@@ -45,6 +45,9 @@
DirectoryStream<Path> stream = newDirectoryStream(dir);
stream.close();
if (!(stream instanceof SecureDirectoryStream)) {
+ if (System.getProperty("os.name").equals("Linux"))
+ throw new AssertionError(
+ "SecureDirectoryStream not supported.");
System.out.println("SecureDirectoryStream not supported.");
return;
}