Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update struct layout for aarch64 linux to match value on device #165

Merged
merged 1 commit into from
Jun 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/main/java/jnr/posix/LinuxFileStatAARCH64.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,19 @@ public Layout(jnr.ffi.Runtime runtime) {
public final uid_t st_uid = new uid_t();
public final gid_t st_gid = new gid_t();
public final dev_t st_rdev = new dev_t();
public final dev_t __pad1 = new dev_t();
public final off_t st_size = new off_t();
public final blksize_t st_blksize = new blksize_t();
public final Signed32 __pad2 = new Signed32();
public final blkcnt_t st_blocks = new blkcnt_t();
public final time_t st_atime = new time_t(); // Time of last access
public final SignedLong st_atimensec = new SignedLong(); // Time of last access (nanoseconds)
public final time_t st_mtime = new time_t(); // Last data modification time
public final SignedLong st_mtimensec = new SignedLong(); // Last data modification time (nanoseconds)
public final time_t st_ctime = new time_t(); // Time of last status change
public final SignedLong st_ctimensec = new SignedLong(); // Time of last status change (nanoseconds)
public final Signed64 __unused4 = new Signed64();
public final Signed32 __unused4 = new Signed32();
public final Signed32 __unused5 = new Signed32();
}

private static final Layout layout = new Layout(jnr.ffi.Runtime.getSystemRuntime());
Expand Down
1 change: 1 addition & 0 deletions src/test/java/jnr/posix/FileStatTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ public void filestat() throws Throwable {
FileStat stat = posix.stat(f.getAbsolutePath());
assertNotNull("posix.stat failed", stat);
assertEquals(size, stat.st_size());
assertEquals(1, stat.nlink());
//assertNotEquals(stat.mtime(), stat.ctime());

stat = posix.allocateStat();
Expand Down