mirror of
https://github.com/lax1dude/unsafe-memcpy-for-java.git
synced 2024-12-21 14:54:13 -08:00
add linux support
This commit is contained in:
parent
a44dfb36e6
commit
d044e587d3
BIN
UnsafeMemcpy.jar
BIN
UnsafeMemcpy.jar
Binary file not shown.
|
@ -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
BIN
libUnsafeMemcpy.so
Normal file
Binary file not shown.
|
@ -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"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user