8214077: test java/io/File/SetLastModified.java fails on ARM32

Replace uses of stat with stat64 in java.base

Reviewed-by: alanb
This commit is contained in:
Nick Gasson 2018-12-14 13:30:21 +00:00 committed by Alan Bateman
parent b83df1e1fc
commit 1d7662e428
3 changed files with 24 additions and 17 deletions

View file

@ -138,13 +138,13 @@ void os_getCmdlineAndUserInfo(JNIEnv *env, jobject jinfo, pid_t pid) {
char *args = NULL;
jstring cmdexe = NULL;
char fn[32];
struct stat stat_buf;
struct stat64 stat_buf;
/*
* Stat /proc/<pid> to get the user id
*/
snprintf(fn, sizeof fn, "/proc/%d", pid);
if (stat(fn, &stat_buf) == 0) {
if (stat64(fn, &stat_buf) == 0) {
unix_getUserInfo(env, jinfo, stat_buf.st_uid);
JNU_CHECK_EXCEPTION(env);
}