Merge branch 'make-arti-work-on-redox' into 'master'

Make Arti working on Redox

See merge request redox-os/redox!2402
This commit is contained in:
Niel D 2026-11-04 04:03:30 +00:00
commit 01dcd7aff0
4 changed files with 49 additions and 2 deletions

View File

@ -29,6 +29,7 @@ xfce4-full = {}
acid = {}
adwaita-icon-theme = {}
arti = {}
atk = {}
autoconf = {}
automake = {}

View File

@ -1,5 +1,5 @@
#TODO add script for gnu make: https://github.com/ip7z/7zip/blob/main/DOC/readme.txt#L110
[source]
tar = "https://7-zip.org/a/7z2605-src.tar.xz"
tar = "https://github.com/ip7z/7zip/releases/download/26.05/7z2605-src.tar.xz"
[build]
template = "cmake"

View File

@ -1,9 +1,17 @@
#TODO fix secmem-proc crate
[source]
git = "https://gitlab.torproject.org/tpo/core/arti"
rev = "arti-v2.7.0"
shallow_clone = true
# TODO: Check if this patch is still necessary after
# we've updated our Rust toolchains on Redox.
patches = ["redox.patch"]
[build]
template = "cargo"
# TODO: Remove `static-sqlite` feature once Redox' sqlite3-package is fully functional.
cargoflags = [
"--no-default-features",
"--features=default-runtime,dns-proxy,compression,bridge-client,pt-client,onion-service-client,vanguards,flowctl-cc,static-sqlite",
]
cargopackages = ["arti"]
dependencies = [
"openssl3",

View File

@ -0,0 +1,38 @@
diff --git a/crates/fslock-guard/Cargo.toml b/crates/fslock-guard/Cargo.toml
index 9cbffb2c..2fd42d35 100644
--- a/crates/fslock-guard/Cargo.toml
+++ b/crates/fslock-guard/Cargo.toml
@@ -24,2 +24,2 @@
-[target.'cfg(target_os = "android")'.dependencies]
+[target.'cfg(any(target_os = "android", target_os = "redox"))'.dependencies]
libc = "0.2"
diff --git a/crates/fslock-guard/src/lib.rs b/crates/fslock-guard/src/lib.rs
index b5e938bb..7c32168c 100644
--- a/crates/fslock-guard/src/lib.rs
+++ b/crates/fslock-guard/src/lib.rs
@@ -177,7 +177,7 @@ impl Drop for LockFileGuard {
/// Try to lock `f`, blocking if need be.
///
/// On non-android, this just calls [`fs::File::lock`].
-#[cfg(not(target_os = "android"))]
+#[cfg(not(any(target_os = "android", target_os = "redox")))]
fn do_lock(f: &fs::File) -> std::io::Result<()> {
f.lock()
}
@@ -185,7 +185,7 @@ fn do_lock(f: &fs::File) -> std::io::Result<()> {
/// Try to lock `f`, without blocking.
///
/// On non-android, this just calls [`fs::File::try_lock`].
-#[cfg(not(target_os = "android"))]
+#[cfg(not(any(target_os = "android", target_os = "redox")))]
fn do_try_lock(f: &fs::File) -> Result<(), std::fs::TryLockError> {
f.try_lock()
}
@@ -207,2 +207,2 @@
-#[cfg(target_os = "android")]
+#[cfg(any(target_os = "android", target_os = "redox"))]
fn do_lock(f: &fs::File) -> std::io::Result<()> {
@@ -234,2 +234,2 @@
-#[cfg(target_os = "android")]
+#[cfg(any(target_os = "android", target_os = "redox"))]
fn do_try_lock(f: &fs::File) -> Result<(), std::fs::TryLockError> {