Permalink
Browse files

ARM architecture support

Tested on Raspberry Pi 2 (Raspbian, Arch Linux) and Raspberry Pi 1 (Arch Linux) with Oracle JDK 8 for ARM.
  • Loading branch information...
1 parent 35e6989 commit db531b5f3343fb66509a258b13c543e6445bbbb8 @pavelfatin pavelfatin committed Jun 16, 2015
Binary file not shown.
View
Binary file not shown.
@@ -194,7 +194,9 @@ private static File getExecutable() {
private static String getExecutableName(final boolean withSubDir) {
if (SystemInfo.isWindows) return (withSubDir ? "win" + File.separator : "") + "fsnotifier.exe";
else if (SystemInfo.isMac) return (withSubDir ? "mac" + File.separator : "") + "fsnotifier";
- else if (SystemInfo.isLinux) return (withSubDir ? "linux" + File.separator : "") + (SystemInfo.isAMD64 ? "fsnotifier64" : "fsnotifier");
+ else if (SystemInfo.isLinux) return (withSubDir ? "linux" + File.separator : "") +
+ ("arm".equals(SystemInfo.OS_ARCH) ? "fsnotifier-arm"
+ : (SystemInfo.isAMD64 ? "fsnotifier64" : "fsnotifier"));
return null;
}
@@ -379,6 +379,7 @@ protected String resolveSymLink(@NotNull final String path) throws Exception {
private static final int[] LINUX_64 = {24, 48, 88, 28, 32};
private static final int[] LNX_PPC32 = {16, 48, 80, 24, 28};
private static final int[] LNX_PPC64 = LINUX_64;
+ private static final int[] LINUX_ARM = LNX_PPC32;
private static final int[] BSD_32 = { 8, 48, 32, 12, 16};
private static final int[] BSD_64 = { 8, 72, 40, 12, 16};
private static final int[] SUN_OS_32 = {20, 48, 64, 28, 32};
@@ -399,7 +400,10 @@ protected String resolveSymLink(@NotNull final String path) throws Exception {
private JnaUnixMediatorImpl() throws Exception {
if (SystemInfo.isLinux) {
- if ("ppc".equals(SystemInfo.OS_ARCH)) {
+ if ("arm".equals(SystemInfo.OS_ARCH)) {
+ myOffsets = LINUX_ARM;
+ }
+ else if ("ppc".equals(SystemInfo.OS_ARCH)) {
myOffsets = SystemInfo.is32Bit ? LNX_PPC32 : LNX_PPC64;
}
else {

0 comments on commit db531b5

Please sign in to comment.