Rollup merge of #138875 - thaliaarchi:trusty-build, r=randomPoison,saethlin
Trusty: Fix build for anonymous pipes and std::sys::process PRs #136842 (Add libstd support for Trusty targets), #137793 (Stablize anonymous pipe), and #136929 (std: move process implementations to `sys`) merged around the same time, so update Trusty to take them into account. cc `@randomPoison`
This commit is contained in:
commit
0d61b83f59
3 changed files with 14 additions and 6 deletions
|
@ -15,9 +15,8 @@ use crate::mem::ManuallyDrop;
|
|||
target_os = "trusty"
|
||||
)))]
|
||||
use crate::sys::cvt;
|
||||
use crate::sys_common::FromInner;
|
||||
#[cfg(not(target_os = "trusty"))]
|
||||
use crate::sys_common::{AsInner, IntoInner};
|
||||
use crate::sys_common::{AsInner, FromInner, IntoInner};
|
||||
use crate::{fmt, io};
|
||||
|
||||
type ValidRawFd = core::num::niche_types::NotAllOnes<RawFd>;
|
||||
|
@ -507,6 +506,7 @@ impl<'a> AsFd for io::StderrLock<'a> {
|
|||
}
|
||||
|
||||
#[stable(feature = "anonymous_pipe", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[cfg(not(target_os = "trusty"))]
|
||||
impl AsFd for io::PipeReader {
|
||||
fn as_fd(&self) -> BorrowedFd<'_> {
|
||||
self.0.as_fd()
|
||||
|
@ -514,6 +514,7 @@ impl AsFd for io::PipeReader {
|
|||
}
|
||||
|
||||
#[stable(feature = "anonymous_pipe", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[cfg(not(target_os = "trusty"))]
|
||||
impl From<io::PipeReader> for OwnedFd {
|
||||
fn from(pipe: io::PipeReader) -> Self {
|
||||
pipe.0.into_inner()
|
||||
|
@ -521,6 +522,7 @@ impl From<io::PipeReader> for OwnedFd {
|
|||
}
|
||||
|
||||
#[stable(feature = "anonymous_pipe", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[cfg(not(target_os = "trusty"))]
|
||||
impl AsFd for io::PipeWriter {
|
||||
fn as_fd(&self) -> BorrowedFd<'_> {
|
||||
self.0.as_fd()
|
||||
|
@ -528,6 +530,7 @@ impl AsFd for io::PipeWriter {
|
|||
}
|
||||
|
||||
#[stable(feature = "anonymous_pipe", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[cfg(not(target_os = "trusty"))]
|
||||
impl From<io::PipeWriter> for OwnedFd {
|
||||
fn from(pipe: io::PipeWriter) -> Self {
|
||||
pipe.0.into_inner()
|
||||
|
@ -535,6 +538,7 @@ impl From<io::PipeWriter> for OwnedFd {
|
|||
}
|
||||
|
||||
#[stable(feature = "anonymous_pipe", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[cfg(not(target_os = "trusty"))]
|
||||
impl From<OwnedFd> for io::PipeReader {
|
||||
fn from(owned_fd: OwnedFd) -> Self {
|
||||
Self(FromInner::from_inner(owned_fd))
|
||||
|
@ -542,6 +546,7 @@ impl From<OwnedFd> for io::PipeReader {
|
|||
}
|
||||
|
||||
#[stable(feature = "anonymous_pipe", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[cfg(not(target_os = "trusty"))]
|
||||
impl From<OwnedFd> for io::PipeWriter {
|
||||
fn from(owned_fd: OwnedFd) -> Self {
|
||||
Self(FromInner::from_inner(owned_fd))
|
||||
|
|
|
@ -18,9 +18,8 @@ use crate::os::unix::io::AsFd;
|
|||
use crate::os::unix::io::OwnedFd;
|
||||
#[cfg(target_os = "wasi")]
|
||||
use crate::os::wasi::io::OwnedFd;
|
||||
use crate::sys_common::FromInner;
|
||||
#[cfg(not(target_os = "trusty"))]
|
||||
use crate::sys_common::{AsInner, IntoInner};
|
||||
use crate::sys_common::{AsInner, FromInner, IntoInner};
|
||||
|
||||
/// Raw file descriptors.
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
|
@ -287,6 +286,7 @@ impl<T: AsRawFd> AsRawFd for Box<T> {
|
|||
}
|
||||
|
||||
#[stable(feature = "anonymous_pipe", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[cfg(not(target_os = "trusty"))]
|
||||
impl AsRawFd for io::PipeReader {
|
||||
fn as_raw_fd(&self) -> RawFd {
|
||||
self.0.as_raw_fd()
|
||||
|
@ -294,6 +294,7 @@ impl AsRawFd for io::PipeReader {
|
|||
}
|
||||
|
||||
#[stable(feature = "anonymous_pipe", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[cfg(not(target_os = "trusty"))]
|
||||
impl FromRawFd for io::PipeReader {
|
||||
unsafe fn from_raw_fd(raw_fd: RawFd) -> Self {
|
||||
Self::from_inner(unsafe { FromRawFd::from_raw_fd(raw_fd) })
|
||||
|
@ -301,6 +302,7 @@ impl FromRawFd for io::PipeReader {
|
|||
}
|
||||
|
||||
#[stable(feature = "anonymous_pipe", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[cfg(not(target_os = "trusty"))]
|
||||
impl IntoRawFd for io::PipeReader {
|
||||
fn into_raw_fd(self) -> RawFd {
|
||||
self.0.into_raw_fd()
|
||||
|
@ -308,6 +310,7 @@ impl IntoRawFd for io::PipeReader {
|
|||
}
|
||||
|
||||
#[stable(feature = "anonymous_pipe", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[cfg(not(target_os = "trusty"))]
|
||||
impl AsRawFd for io::PipeWriter {
|
||||
fn as_raw_fd(&self) -> RawFd {
|
||||
self.0.as_raw_fd()
|
||||
|
@ -315,6 +318,7 @@ impl AsRawFd for io::PipeWriter {
|
|||
}
|
||||
|
||||
#[stable(feature = "anonymous_pipe", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[cfg(not(target_os = "trusty"))]
|
||||
impl FromRawFd for io::PipeWriter {
|
||||
unsafe fn from_raw_fd(raw_fd: RawFd) -> Self {
|
||||
Self::from_inner(unsafe { FromRawFd::from_raw_fd(raw_fd) })
|
||||
|
@ -322,6 +326,7 @@ impl FromRawFd for io::PipeWriter {
|
|||
}
|
||||
|
||||
#[stable(feature = "anonymous_pipe", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[cfg(not(target_os = "trusty"))]
|
||||
impl IntoRawFd for io::PipeWriter {
|
||||
fn into_raw_fd(self) -> RawFd {
|
||||
self.0.into_raw_fd()
|
||||
|
|
|
@ -11,8 +11,6 @@ pub mod env;
|
|||
pub mod os;
|
||||
#[path = "../unsupported/pipe.rs"]
|
||||
pub mod pipe;
|
||||
#[path = "../unsupported/process.rs"]
|
||||
pub mod process;
|
||||
#[path = "../unsupported/thread.rs"]
|
||||
pub mod thread;
|
||||
#[path = "../unsupported/time.rs"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue