Skip to content

Commit 52d5170

Browse files
committed
Expose SeekData and SeedHole on all Linux targets
These were previously missing on musl and mips targets because of missing definitions in the libc crate.
1 parent 96054b6 commit 52d5170

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

src/unistd.rs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1018,20 +1018,14 @@ pub enum Whence {
10181018
/// Specify an offset relative to the next location in the file greater than or
10191019
/// equal to offset that contains some data. If offset points to
10201020
/// some data, then the file offset is set to offset.
1021-
#[cfg(any(target_os = "dragonfly", target_os = "freebsd",
1022-
all(target_os = "linux", not(any(target_env = "musl",
1023-
target_arch = "mips",
1024-
target_arch = "mips64")))))]
1021+
#[cfg(any(target_os = "dragonfly", target_os = "freebsd", target_os = "linux"))]
10251022
SeekData = libc::SEEK_DATA,
10261023
/// Specify an offset relative to the next hole in the file greater than
10271024
/// or equal to offset. If offset points into the middle of a hole, then
10281025
/// the file offset should be set to offset. If there is no hole past offset,
10291026
/// then the file offset should be adjusted to the end of the file (i.e., there
10301027
/// is an implicit hole at the end of any file).
1031-
#[cfg(any(target_os = "dragonfly", target_os = "freebsd",
1032-
all(target_os = "linux", not(any(target_env = "musl",
1033-
target_arch = "mips",
1034-
target_arch = "mips64")))))]
1028+
#[cfg(any(target_os = "dragonfly", target_os = "freebsd", target_os = "linux"))]
10351029
SeekHole = libc::SEEK_HOLE
10361030
}
10371031

0 commit comments

Comments
 (0)