diff --git a/changelog/2473.added.md b/changelog/2473.added.md new file mode 100644 index 0000000000..57c3301327 --- /dev/null +++ b/changelog/2473.added.md @@ -0,0 +1 @@ +Add `SeekData` and `SeekHole` to `Whence` for hurd and apple targets diff --git a/src/unistd.rs b/src/unistd.rs index 382333af3e..e657d7ee07 100644 --- a/src/unistd.rs +++ b/src/unistd.rs @@ -1426,8 +1426,10 @@ pub enum Whence { /// equal to offset that contains some data. If offset points to /// some data, then the file offset is set to offset. #[cfg(any( + apple_targets, freebsdlike, solarish, + target_os = "hurd", target_os = "linux", ))] SeekData = libc::SEEK_DATA, @@ -1437,8 +1439,10 @@ pub enum Whence { /// then the file offset should be adjusted to the end of the file (i.e., there /// is an implicit hole at the end of any file). #[cfg(any( + apple_targets, freebsdlike, solarish, + target_os = "hurd", target_os = "linux", ))] SeekHole = libc::SEEK_HOLE,