Skip to content

Commit db531b5

Browse files
committed
ARM architecture support
Tested on Raspberry Pi 2 (Raspbian, Arch Linux) and Raspberry Pi 1 (Arch Linux) with Oracle JDK 8 for ARM.
1 parent 35e6989 commit db531b5

File tree

4 files changed

+8
-2
lines changed

4 files changed

+8
-2
lines changed

bin/linux/fsnotifier-arm

25.8 KB
Binary file not shown.

lib/jna.jar

1.11 KB
Binary file not shown.

platform/platform-impl/src/com/intellij/openapi/vfs/impl/local/FileWatcher.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,9 @@ private static File getExecutable() {
194194
private static String getExecutableName(final boolean withSubDir) {
195195
if (SystemInfo.isWindows) return (withSubDir ? "win" + File.separator : "") + "fsnotifier.exe";
196196
else if (SystemInfo.isMac) return (withSubDir ? "mac" + File.separator : "") + "fsnotifier";
197-
else if (SystemInfo.isLinux) return (withSubDir ? "linux" + File.separator : "") + (SystemInfo.isAMD64 ? "fsnotifier64" : "fsnotifier");
197+
else if (SystemInfo.isLinux) return (withSubDir ? "linux" + File.separator : "") +
198+
("arm".equals(SystemInfo.OS_ARCH) ? "fsnotifier-arm"
199+
: (SystemInfo.isAMD64 ? "fsnotifier64" : "fsnotifier"));
198200
return null;
199201
}
200202

platform/util/src/com/intellij/openapi/util/io/FileSystemUtil.java

+5-1
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,7 @@ private interface LibC extends Library {
379379
private static final int[] LINUX_64 = {24, 48, 88, 28, 32};
380380
private static final int[] LNX_PPC32 = {16, 48, 80, 24, 28};
381381
private static final int[] LNX_PPC64 = LINUX_64;
382+
private static final int[] LINUX_ARM = LNX_PPC32;
382383
private static final int[] BSD_32 = { 8, 48, 32, 12, 16};
383384
private static final int[] BSD_64 = { 8, 72, 40, 12, 16};
384385
private static final int[] SUN_OS_32 = {20, 48, 64, 28, 32};
@@ -399,7 +400,10 @@ private interface LibC extends Library {
399400

400401
private JnaUnixMediatorImpl() throws Exception {
401402
if (SystemInfo.isLinux) {
402-
if ("ppc".equals(SystemInfo.OS_ARCH)) {
403+
if ("arm".equals(SystemInfo.OS_ARCH)) {
404+
myOffsets = LINUX_ARM;
405+
}
406+
else if ("ppc".equals(SystemInfo.OS_ARCH)) {
403407
myOffsets = SystemInfo.is32Bit ? LNX_PPC32 : LNX_PPC64;
404408
}
405409
else {

0 commit comments

Comments
 (0)