Skip to content

Commit

Permalink
spotless
Browse files Browse the repository at this point in the history
  • Loading branch information
rjernst committed Jul 10, 2024
1 parent 080c02e commit 91589f6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

package org.elasticsearch.nativeaccess.jna;

import com.sun.jna.FunctionMapper;
import com.sun.jna.Library;
import com.sun.jna.Memory;
import com.sun.jna.Native;
Expand All @@ -20,7 +19,6 @@

import java.util.Arrays;
import java.util.List;
import java.util.Map;

class JnaPosixCLibrary implements PosixCLibrary {

Expand Down Expand Up @@ -133,6 +131,7 @@ private interface NativeFunctions extends Library {
private interface FStat64Function extends Library {
int fstat64(int fd, Pointer stat);
}

private interface FXStatFunction extends Library {
int __fxstat(int version, int fd, Pointer stat);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,11 @@ class JdkPosixCLibrary implements PosixCLibrary {
// Due to different sizes of the stat structure for 32 vs 64 bit machines, on some systems fstat actually points to
// an internal symbol. So we fall back to looking for that symbol.
int fstat_version = System.getProperty("os.arch").equals("aarch64") ? 0 : 1;
fstat = MethodHandles.insertArguments(downcallHandleWithErrno("__fxstat", FunctionDescriptor.of(JAVA_INT, JAVA_INT, JAVA_INT, ADDRESS)), 1, fstat_version);
fstat = MethodHandles.insertArguments(
downcallHandleWithErrno("__fxstat", FunctionDescriptor.of(JAVA_INT, JAVA_INT, JAVA_INT, ADDRESS)),
1,
fstat_version
);
}
fstat$mh = fstat;
}
Expand Down

0 comments on commit 91589f6

Please sign in to comment.