Skip to content

Commit

Permalink
Add SeekData and SeekHole to Whence for hurd and apple targets (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
xzfc authored Aug 19, 2024
1 parent c5a4299 commit 8e74bb4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions changelog/2473.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add `SeekData` and `SeekHole` to `Whence` for hurd and apple targets
4 changes: 4 additions & 0 deletions src/unistd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down

0 comments on commit 8e74bb4

Please sign in to comment.