mirror of
https://gitlab.redox-os.org/redox-os/redox.git
synced 2026-06-23 05:14:18 +08:00
Merge branch 'rustpython-x86' into 'master'
Update rustpython to fix i586 build See merge request redox-os/redox!1715
This commit is contained in:
commit
7e122d72fd
@ -12,4 +12,3 @@ include = ["../desktop.toml"]
|
||||
# Package settings
|
||||
[packages]
|
||||
# example = {}
|
||||
rustpython = "ignore" # https://github.com/Alexhuszagh/rust-lexical/issues/218
|
||||
@ -1,8 +1,10 @@
|
||||
[source]
|
||||
git = "https://github.com/RustPython/RustPython"
|
||||
# requires https://github.com/rust-lang/rust/pull/137319
|
||||
# since https://github.com/RustPython/RustPython/pull/5858
|
||||
rev = "e41d7f523a74c36b9f360d992ce0a9eb7e604c2b"
|
||||
# newer rev requires TLS 1.3 (openssl3) and 'bits/libc-header-start.h' for bindgen
|
||||
rev = "2025-10-13-main-51"
|
||||
patches = [
|
||||
"redox.patch"
|
||||
]
|
||||
|
||||
[build]
|
||||
dependencies = [
|
||||
|
||||
22
recipes/dev/rustpython/redox.patch
Normal file
22
recipes/dev/rustpython/redox.patch
Normal file
@ -0,0 +1,22 @@
|
||||
diff --git a/stdlib/src/posixsubprocess.rs b/stdlib/src/posixsubprocess.rs
|
||||
index 7f418c899..4da6a6858 100644
|
||||
--- a/stdlib/src/posixsubprocess.rs
|
||||
+++ b/stdlib/src/posixsubprocess.rs
|
||||
@@ -441,15 +441,14 @@ fn close_dir_fds(keep: KeepFds<'_>) -> nix::Result<()> {
|
||||
fn close_filetable_fds(keep: KeepFds<'_>) -> nix::Result<()> {
|
||||
use nix::fcntl;
|
||||
use std::os::fd::{FromRawFd, OwnedFd};
|
||||
- let fd = fcntl::open(
|
||||
+ let filetable = fcntl::open(
|
||||
c"/scheme/thisproc/current/filetable",
|
||||
fcntl::OFlag::O_RDONLY,
|
||||
nix::sys::stat::Mode::empty(),
|
||||
)?;
|
||||
- let filetable = unsafe { OwnedFd::from_raw_fd(fd) };
|
||||
let read_one = || -> nix::Result<_> {
|
||||
let mut byte = 0;
|
||||
- let n = nix::unistd::read(filetable.as_raw_fd(), std::slice::from_mut(&mut byte))?;
|
||||
+ let n = nix::unistd::read(&filetable, std::slice::from_mut(&mut byte))?;
|
||||
Ok((n > 0).then_some(byte))
|
||||
};
|
||||
while let Some(c) = read_one()? {
|
||||
Loading…
Reference in New Issue
Block a user