Skip to content

Commit ed7281e

Browse files
committed
Auto merge of #112595 - hargoniX:l4re_fix, r=Mark-Simulacrum
fix: get the l4re target working again This is based on work from #103966, addressing the review comment by `@m-ou-se` at the time and "fixing" the (probably newly) missing read_buf.
2 parents 3b2073f + 8246662 commit ed7281e

File tree

3 files changed

+23
-3
lines changed

3 files changed

+23
-3
lines changed

library/std/src/personality.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ cfg_if::cfg_if! {
2929
all(target_family = "windows", target_env = "gnu"),
3030
target_os = "psp",
3131
target_os = "solid_asp3",
32-
all(target_family = "unix", not(target_os = "espidf")),
32+
all(target_family = "unix", not(target_os = "espidf"), not(target_os = "l4re")),
3333
all(target_vendor = "fortanix", target_env = "sgx"),
3434
))] {
3535
mod gcc;

library/std/src/sys/unix/l4re.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ macro_rules! unimpl {
1010
pub mod net {
1111
#![allow(warnings)]
1212
use crate::fmt;
13-
use crate::io::{self, IoSlice, IoSliceMut};
13+
use crate::io::{self, BorrowedCursor, IoSlice, IoSliceMut};
1414
use crate::net::{Ipv4Addr, Ipv6Addr, Shutdown, SocketAddr};
1515
use crate::os::unix::io::{AsFd, AsRawFd, BorrowedFd, FromRawFd, IntoRawFd, RawFd};
1616
use crate::sys::fd::FileDesc;
@@ -218,6 +218,10 @@ pub mod net {
218218
unimpl!();
219219
}
220220

221+
pub fn read_buf(&self, _: BorrowedCursor<'_>) -> io::Result<()> {
222+
unimpl!();
223+
}
224+
221225
pub fn read_vectored(&self, _: &mut [IoSliceMut<'_>]) -> io::Result<usize> {
222226
unimpl!();
223227
}

library/std/src/sys/unix/process/process_unix.rs

+17-1
Original file line numberDiff line numberDiff line change
@@ -836,31 +836,47 @@ fn signal_string(signal: i32) -> &'static str {
836836
libc::SIGILL => " (SIGILL)",
837837
libc::SIGTRAP => " (SIGTRAP)",
838838
libc::SIGABRT => " (SIGABRT)",
839+
#[cfg(not(target_os = "l4re"))]
839840
libc::SIGBUS => " (SIGBUS)",
840841
libc::SIGFPE => " (SIGFPE)",
841842
libc::SIGKILL => " (SIGKILL)",
843+
#[cfg(not(target_os = "l4re"))]
842844
libc::SIGUSR1 => " (SIGUSR1)",
843845
libc::SIGSEGV => " (SIGSEGV)",
846+
#[cfg(not(target_os = "l4re"))]
844847
libc::SIGUSR2 => " (SIGUSR2)",
845848
libc::SIGPIPE => " (SIGPIPE)",
846849
libc::SIGALRM => " (SIGALRM)",
847850
libc::SIGTERM => " (SIGTERM)",
851+
#[cfg(not(target_os = "l4re"))]
848852
libc::SIGCHLD => " (SIGCHLD)",
853+
#[cfg(not(target_os = "l4re"))]
849854
libc::SIGCONT => " (SIGCONT)",
855+
#[cfg(not(target_os = "l4re"))]
850856
libc::SIGSTOP => " (SIGSTOP)",
857+
#[cfg(not(target_os = "l4re"))]
851858
libc::SIGTSTP => " (SIGTSTP)",
859+
#[cfg(not(target_os = "l4re"))]
852860
libc::SIGTTIN => " (SIGTTIN)",
861+
#[cfg(not(target_os = "l4re"))]
853862
libc::SIGTTOU => " (SIGTTOU)",
863+
#[cfg(not(target_os = "l4re"))]
854864
libc::SIGURG => " (SIGURG)",
865+
#[cfg(not(target_os = "l4re"))]
855866
libc::SIGXCPU => " (SIGXCPU)",
867+
#[cfg(not(target_os = "l4re"))]
856868
libc::SIGXFSZ => " (SIGXFSZ)",
869+
#[cfg(not(target_os = "l4re"))]
857870
libc::SIGVTALRM => " (SIGVTALRM)",
871+
#[cfg(not(target_os = "l4re"))]
858872
libc::SIGPROF => " (SIGPROF)",
873+
#[cfg(not(target_os = "l4re"))]
859874
libc::SIGWINCH => " (SIGWINCH)",
860-
#[cfg(not(target_os = "haiku"))]
875+
#[cfg(not(any(target_os = "haiku", target_os = "l4re")))]
861876
libc::SIGIO => " (SIGIO)",
862877
#[cfg(target_os = "haiku")]
863878
libc::SIGPOLL => " (SIGPOLL)",
879+
#[cfg(not(target_os = "l4re"))]
864880
libc::SIGSYS => " (SIGSYS)",
865881
// For information on Linux signals, run `man 7 signal`
866882
#[cfg(all(

0 commit comments

Comments
 (0)