add linux support

This commit is contained in:
lax1dude 2024-04-19 22:47:01 -07:00
parent a44dfb36e6
commit d044e587d3
4 changed files with 2 additions and 5 deletions

Binary file not shown.

View File

@ -40,11 +40,7 @@ public class UnsafeUtils {
public static void loadNatives() { public static void loadNatives() {
if(!hasLoadedNatives) { if(!hasLoadedNatives) {
hasLoadedNatives = true; hasLoadedNatives = true;
if(System.getProperty("os.name").toLowerCase().contains("windows")) {
System.loadLibrary("UnsafeMemcpy"); System.loadLibrary("UnsafeMemcpy");
}else {
System.loadLibrary("unsafememcpy");
}
int major = getVersionMajor(); int major = getVersionMajor();
int minor = getVersionMinor(); int minor = getVersionMinor();
if(major != 1 || minor < 0) { if(major != 1 || minor < 0) {

BIN
libUnsafeMemcpy.so Normal file

Binary file not shown.

View File

@ -29,6 +29,7 @@
#include <jni.h> #include <jni.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdint.h> #include <stdint.h>
#include <string.h>
#include "utils.h" #include "utils.h"