mirror of
https://github.com/xerial/snappy-java.git
synced 2025-07-27 07:54:17 +02:00
fix: update files
This commit is contained in:
parent
70e710c9b8
commit
0dc3e64353
@ -327,20 +327,7 @@ public class SnappyLoader
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Load an OS-dependent native library inside a jar file
|
// Load an OS-dependent native library inside a jar file
|
||||||
String osName = OSInfo.getOSName();
|
snappyNativeLibraryPath = "/org/xerial/snappy/native/" + OSInfo.getNativeLibFolderPathForCurrentOS();
|
||||||
// Check for musl by looking at the output of ldd --version
|
|
||||||
try {
|
|
||||||
Process p = Runtime.getRuntime().exec(new String[]{"ldd", "--version"});
|
|
||||||
try (BufferedReader br = new BufferedReader(new InputStreamReader(p.getErrorStream()))) {
|
|
||||||
String line = br.readLine();
|
|
||||||
if (line != null && line.toLowerCase().contains("musl")) {
|
|
||||||
osName = "Linux-musl";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch (Exception e) {
|
|
||||||
// Ignore errors - default to normal Linux detection
|
|
||||||
}
|
|
||||||
snappyNativeLibraryPath = "/org/xerial/snappy/native/" + osName + "/" + OSInfo.getArchName();
|
|
||||||
boolean hasNativeLib = hasResource(snappyNativeLibraryPath + "/" + snappyNativeLibraryName);
|
boolean hasNativeLib = hasResource(snappyNativeLibraryPath + "/" + snappyNativeLibraryName);
|
||||||
if (!hasNativeLib) {
|
if (!hasNativeLib) {
|
||||||
if (OSInfo.getOSName().equals("Mac")) {
|
if (OSInfo.getOSName().equals("Mac")) {
|
||||||
|
@ -1 +0,0 @@
|
|||||||
This directory contains native libraries for Linux-musl x86_64 platform
|
|
Loading…
x
Reference in New Issue
Block a user