forked from PaperMC/Waterfall
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
11 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
From 746aa6d9c90eca0a17d6dcd030787ac9e1174440 Mon Sep 17 00:00:00 2001 | ||
From c994ac5bf709cdb6a8a8ab79330cbd712ef00bd8 Mon Sep 17 00:00:00 2001 | ||
From: Colin Godsey <[email protected]> | ||
Date: Tue, 16 Apr 2019 07:25:52 -0600 | ||
Subject: [PATCH] OSX native zlib and crypto | ||
|
@@ -78,7 +78,7 @@ index dee50c6a..7f91b9b9 100644 | |
|
||
static jclass classID; | ||
diff --git a/native/src/main/java/net/md_5/bungee/jni/NativeCode.java b/native/src/main/java/net/md_5/bungee/jni/NativeCode.java | ||
index 4426823c..05ca22b1 100644 | ||
index 4426823c..67a0b80d 100644 | ||
--- a/native/src/main/java/net/md_5/bungee/jni/NativeCode.java | ||
+++ b/native/src/main/java/net/md_5/bungee/jni/NativeCode.java | ||
@@ -27,6 +27,7 @@ public final class NativeCode<T> | ||
|
@@ -89,7 +89,7 @@ index 4426823c..05ca22b1 100644 | |
this.name = name; | ||
this.javaImpl = javaImpl; | ||
this.nativeImpl = nativeImpl; | ||
@@ -95,16 +96,19 @@ public final class NativeCode<T> | ||
@@ -95,16 +96,27 @@ public final class NativeCode<T> | ||
|
||
public static boolean isSupported() | ||
{ | ||
|
@@ -99,16 +99,22 @@ index 4426823c..05ca22b1 100644 | |
+ | ||
+ return ("Linux".equals(osName) || "Mac OS X".equals(osName)) && (isAmd64(osArch) || isAarch64(osArch)); | ||
} | ||
- | ||
- private static boolean isAmd64() | ||
+ private static boolean isAmd64() { | ||
+ return isAmd64(System.getProperty("os.arch")); | ||
+ } | ||
+ | ||
+ private static boolean isAmd64(String osArch) | ||
{ | ||
- return "amd64".equals( System.getProperty( "os.arch" ) ); | ||
+ return "amd64".equals(osArch) || "x86_64".equals(osArch); | ||
} | ||
- | ||
- private static boolean isAarch64() | ||
+ private static boolean isAarch64() { | ||
+ return isAarch64(System.getProperty("os.arch")); | ||
+ } | ||
+ | ||
+ private static boolean isAarch64(String osArch) | ||
{ | ||
|