Skip to content

Commit

Permalink
fix bad patch
Browse files Browse the repository at this point in the history
  • Loading branch information
linsaftw committed Sep 23, 2024
1 parent 8e96355 commit 2f088e8
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions BungeeCord-Patches/0046-OSX-native-zlib-and-crypto.patch
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
Expand Down Expand Up @@ -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>
Expand All @@ -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()
{
Expand All @@ -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)
{
Expand Down

0 comments on commit 2f088e8

Please sign in to comment.