fix: update files

This commit is contained in:
Samuel Fernandes 2025-01-17 17:20:22 +00:00
parent 70e710c9b8
commit 0dc3e64353
No known key found for this signature in database
GPG Key ID: C74A5164FE13D9B6
3 changed files with 1 additions and 15 deletions

View File

@ -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")) {

View File

@ -1 +0,0 @@
This directory contains native libraries for Linux-musl x86_64 platform