summaryrefslogtreecommitdiffstats
path: root/library/std/src/sys/unix/fd.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 18:31:44 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 18:31:44 +0000
commitc23a457e72abe608715ac76f076f47dc42af07a5 (patch)
tree2772049aaf84b5c9d0ed12ec8d86812f7a7904b6 /library/std/src/sys/unix/fd.rs
parentReleasing progress-linux version 1.73.0+dfsg1-1~progress7.99u1. (diff)
downloadrustc-c23a457e72abe608715ac76f076f47dc42af07a5.tar.xz
rustc-c23a457e72abe608715ac76f076f47dc42af07a5.zip
Merging upstream version 1.74.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'library/std/src/sys/unix/fd.rs')
-rw-r--r--library/std/src/sys/unix/fd.rs18
1 files changed, 12 insertions, 6 deletions
diff --git a/library/std/src/sys/unix/fd.rs b/library/std/src/sys/unix/fd.rs
index 85e020ae4..6c4f40842 100644
--- a/library/std/src/sys/unix/fd.rs
+++ b/library/std/src/sys/unix/fd.rs
@@ -13,14 +13,16 @@ use crate::sys_common::{AsInner, FromInner, IntoInner};
target_os = "android",
target_os = "linux",
target_os = "emscripten",
- target_os = "l4re"
+ target_os = "l4re",
+ target_os = "hurd",
))]
use libc::off64_t;
#[cfg(not(any(
target_os = "linux",
target_os = "emscripten",
target_os = "l4re",
- target_os = "android"
+ target_os = "android",
+ target_os = "hurd",
)))]
use libc::off_t as off64_t;
@@ -124,9 +126,9 @@ impl FileDesc {
}
pub fn read_at(&self, buf: &mut [u8], offset: u64) -> io::Result<usize> {
- #[cfg(not(any(target_os = "linux", target_os = "android")))]
+ #[cfg(not(any(target_os = "linux", target_os = "android", target_os = "hurd")))]
use libc::pread as pread64;
- #[cfg(any(target_os = "linux", target_os = "android"))]
+ #[cfg(any(target_os = "linux", target_os = "android", target_os = "hurd"))]
use libc::pread64;
unsafe {
@@ -160,6 +162,7 @@ impl FileDesc {
target_os = "emscripten",
target_os = "freebsd",
target_os = "fuchsia",
+ target_os = "hurd",
target_os = "illumos",
target_os = "linux",
target_os = "netbsd",
@@ -181,6 +184,7 @@ impl FileDesc {
target_os = "emscripten",
target_os = "freebsd",
target_os = "fuchsia",
+ target_os = "hurd",
target_os = "illumos",
target_os = "ios",
target_os = "tvos",
@@ -281,9 +285,9 @@ impl FileDesc {
}
pub fn write_at(&self, buf: &[u8], offset: u64) -> io::Result<usize> {
- #[cfg(not(any(target_os = "linux", target_os = "android")))]
+ #[cfg(not(any(target_os = "linux", target_os = "android", target_os = "hurd")))]
use libc::pwrite as pwrite64;
- #[cfg(any(target_os = "linux", target_os = "android"))]
+ #[cfg(any(target_os = "linux", target_os = "android", target_os = "hurd"))]
use libc::pwrite64;
unsafe {
@@ -301,6 +305,7 @@ impl FileDesc {
target_os = "emscripten",
target_os = "freebsd",
target_os = "fuchsia",
+ target_os = "hurd",
target_os = "illumos",
target_os = "linux",
target_os = "netbsd",
@@ -322,6 +327,7 @@ impl FileDesc {
target_os = "emscripten",
target_os = "freebsd",
target_os = "fuchsia",
+ target_os = "hurd",
target_os = "illumos",
target_os = "ios",
target_os = "tvos",