Skip to content

Commit

Permalink
Skip detecting ABI on anything other than linux
Browse files Browse the repository at this point in the history
  • Loading branch information
jjlauer committed Oct 24, 2023
1 parent 8b57489 commit b2682fc
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/main/java/com/fizzed/jne/PlatformInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,13 @@ public LinuxDetectedFilesResult init() {
}

static LinuxDetectedFilesResult doDetectLinuxLibFiles() {
// only do this on linux
final OperatingSystem os = detectOperatingSystem();
if (os != OperatingSystem.LINUX) {
// skip doing this on anything other than linux
return null;
}

// issue: https://github.com/facebook/rocksdb/issues/9956
// some version of the kernel are missing mapped files, and its potentially slow as well
final long now = System.currentTimeMillis();
Expand Down Expand Up @@ -344,6 +351,13 @@ public LinuxDetectedFilesResult init() {
}

static LinuxDetectedFilesResult doDetectLinuxMappedFiles() {
// only do this on linux
final OperatingSystem os = detectOperatingSystem();
if (os != OperatingSystem.LINUX) {
// skip doing this on anything other than linux
return null;
}

// NOTE: this was only added in linux v3.3+, it will not work below that
// https://github.com/dmlc/xgboost/issues/7915
// helpful technique discovered from https://github.com/xerial/sqlite-jdbc/blob/master/src/main/java/org/sqlite/util/OSInfo.java
Expand Down

0 comments on commit b2682fc

Please sign in to comment.