Skip to content

Commit 2dc2652

Browse files
committed
std: fix module references on UNIX
1 parent cc68f60 commit 2dc2652

File tree

6 files changed

+13
-13
lines changed

6 files changed

+13
-13
lines changed

library/std/src/sys/pal/unix/fs.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -2004,7 +2004,7 @@ mod remove_dir_impl {
20042004

20052005
pub unsafe fn openat(dirfd: c_int, pathname: *const c_char, flags: c_int) -> c_int {
20062006
get_openat_fn().map(|openat| openat(dirfd, pathname, flags)).unwrap_or_else(|| {
2007-
crate::sys::unix::os::set_errno(libc::ENOSYS);
2007+
super::os::set_errno(libc::ENOSYS);
20082008
-1
20092009
})
20102010
}
@@ -2015,15 +2015,15 @@ mod remove_dir_impl {
20152015
#[cfg(all(target_os = "macos", target_arch = "x86_64"))]
20162016
weak!(fn fdopendir(c_int) -> *mut DIR, "fdopendir$INODE64");
20172017
fdopendir.get().map(|fdopendir| fdopendir(fd)).unwrap_or_else(|| {
2018-
crate::sys::unix::os::set_errno(libc::ENOSYS);
2018+
super::os::set_errno(libc::ENOSYS);
20192019
crate::ptr::null_mut()
20202020
})
20212021
}
20222022

20232023
pub unsafe fn unlinkat(dirfd: c_int, pathname: *const c_char, flags: c_int) -> c_int {
20242024
weak!(fn unlinkat(c_int, *const c_char, c_int) -> c_int);
20252025
unlinkat.get().map(|unlinkat| unlinkat(dirfd, pathname, flags)).unwrap_or_else(|| {
2026-
crate::sys::unix::os::set_errno(libc::ENOSYS);
2026+
super::os::set_errno(libc::ENOSYS);
20272027
-1
20282028
})
20292029
}

library/std/src/sys/pal/unix/net.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
use super::IsMinusOne;
12
use crate::cmp;
23
use crate::ffi::CStr;
34
use crate::io::{self, BorrowedBuf, BorrowedCursor, IoSlice, IoSliceMut};
@@ -6,7 +7,6 @@ use crate::net::{Shutdown, SocketAddr};
67
use crate::os::unix::io::{AsFd, AsRawFd, BorrowedFd, FromRawFd, IntoRawFd, RawFd};
78
use crate::str;
89
use crate::sys::fd::FileDesc;
9-
use crate::sys::unix::IsMinusOne;
1010
use crate::sys_common::net::{getsockopt, setsockopt, sockaddr_to_addr};
1111
use crate::sys_common::{AsInner, FromInner, IntoInner};
1212
use crate::time::{Duration, Instant};

library/std/src/sys/pal/unix/process/process_common.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ cfg_if::cfg_if! {
6363

6464
let bit = (signum - 1) as usize;
6565
if set.is_null() || bit >= (8 * size_of::<sigset_t>()) {
66-
crate::sys::unix::os::set_errno(libc::EINVAL);
66+
crate::sys::pal::unix::os::set_errno(libc::EINVAL);
6767
return -1;
6868
}
6969
let raw = slice::from_raw_parts_mut(

library/std/src/sys/pal/unix/process/process_unsupported.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
use crate::fmt;
22
use crate::io;
33
use crate::num::NonZeroI32;
4+
use crate::sys::pal::unix::unsupported::*;
45
use crate::sys::process::process_common::*;
5-
use crate::sys::unix::unsupported::*;
66
use core::ffi::NonZero_c_int;
77

88
use libc::{c_int, pid_t};

library/std/src/sys/pal/unix/stack_overflow.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ mod imp {
5555
use libc::{MAP_ANON, MAP_PRIVATE, PROT_NONE, PROT_READ, PROT_WRITE, SIGSEGV};
5656

5757
use crate::sync::atomic::{AtomicBool, AtomicPtr, Ordering};
58-
use crate::sys::unix::os::page_size;
58+
use crate::sys::pal::unix::os::page_size;
5959
use crate::sys_common::thread_info;
6060

6161
// Signal handler for the SIGSEGV and SIGBUS handlers. We've got guard pages

library/std/src/sys/pal/unix/time.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ struct Nanoseconds(u32);
2323

2424
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
2525
pub struct SystemTime {
26-
pub(in crate::sys::unix) t: Timespec,
26+
pub(super) t: Timespec,
2727
}
2828

2929
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
30-
pub(in crate::sys::unix) struct Timespec {
30+
pub(super) struct Timespec {
3131
tv_sec: i64,
3232
tv_nsec: Nanoseconds,
3333
}
@@ -239,11 +239,11 @@ impl From<libc::timespec> for Timespec {
239239
not(target_arch = "riscv32")
240240
))]
241241
#[repr(C)]
242-
pub(in crate::sys::unix) struct __timespec64 {
243-
pub(in crate::sys::unix) tv_sec: i64,
242+
pub(super) struct __timespec64 {
243+
pub(super) tv_sec: i64,
244244
#[cfg(target_endian = "big")]
245245
_padding: i32,
246-
pub(in crate::sys::unix) tv_nsec: i32,
246+
pub(super) tv_nsec: i32,
247247
#[cfg(target_endian = "little")]
248248
_padding: i32,
249249
}
@@ -255,7 +255,7 @@ pub(in crate::sys::unix) struct __timespec64 {
255255
not(target_arch = "riscv32")
256256
))]
257257
impl __timespec64 {
258-
pub(in crate::sys::unix) fn new(tv_sec: i64, tv_nsec: i32) -> Self {
258+
pub(super) fn new(tv_sec: i64, tv_nsec: i32) -> Self {
259259
Self { tv_sec, tv_nsec, _padding: 0 }
260260
}
261261
}

0 commit comments

Comments
 (0)