mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-06-11 16:45:35 +02:00
WIP: macos support
This commit is contained in:
@@ -53,7 +53,7 @@ class UnixTorPlugin extends JavaTorPlugin {
|
||||
|
||||
private interface CLibrary extends Library {
|
||||
|
||||
CLibrary INSTANCE = Native.loadLibrary("c", CLibrary.class);
|
||||
CLibrary INSTANCE = Native.load("c", CLibrary.class);
|
||||
|
||||
int getpid();
|
||||
}
|
||||
|
||||
+9
-4
@@ -27,6 +27,7 @@ import javax.net.SocketFactory;
|
||||
|
||||
import static java.util.logging.Level.INFO;
|
||||
import static org.briarproject.bramble.util.OsUtils.isLinux;
|
||||
import static org.briarproject.bramble.util.OsUtils.isMac;
|
||||
|
||||
@Immutable
|
||||
@NotNullByDefault
|
||||
@@ -57,14 +58,18 @@ public class UnixTorPluginFactory extends TorPluginFactory {
|
||||
@Nullable
|
||||
@Override
|
||||
String getArchitectureForTorBinary() {
|
||||
if (!isLinux()) return null;
|
||||
if (!isLinux() && !isMac()) return null;
|
||||
String arch = System.getProperty("os.arch");
|
||||
if (LOG.isLoggable(INFO)) {
|
||||
LOG.info("System's os.arch is " + arch);
|
||||
}
|
||||
if (arch.equals("amd64")) return "x86_64";
|
||||
else if (arch.equals("aarch64")) return "aarch64";
|
||||
else if (arch.equals("arm")) return "armhf";
|
||||
if (isLinux()) {
|
||||
if (arch.equals("amd64")) return "x86_64";
|
||||
else if (arch.equals("aarch64")) return "aarch64";
|
||||
else if (arch.equals("arm")) return "armhf";
|
||||
} else if (isMac()) {
|
||||
if (arch.equals("aarch64")) return "aarch64";
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
BIN
Binary file not shown.
File diff suppressed because it is too large
Load Diff
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user