Skip to content

Commit c4b37bd

Browse files
committed
Added cfg options to SeekData and SeekHole so they don't appear on linux with musl or mips.
1 parent 13cbae0 commit c4b37bd

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/unistd.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -751,14 +751,16 @@ pub enum Whence {
751751
/// Specify an offset relative to the next location in the file greater than or
752752
/// equal to offset that contains some data. If offset points to
753753
/// some data, then the file offset is set to offset.
754-
#[cfg(any(target_os = "dragonfly", target_os = "freebsd", target_os = "linux"))]
754+
#[cfg(any(target_os = "dragonfly", target_os = "freebsd",
755+
all(target_os = "linux", not(any(target_env = "musl", target_arch = "mips")))))]
755756
SeekData = libc::SEEK_DATA,
756757
/// Specify an offset relative to the next hole in the file greater than
757758
/// or equal to offset. If offset points into the middle of a hole, then
758759
/// the file offset should be set to offset. If there is no hole past offset,
759760
/// then the file offset should be adjusted to the end of the file (i.e., there
760761
/// is an implicit hole at the end of any file).
761-
#[cfg(any(target_os = "dragonfly", target_os = "freebsd", target_os = "linux"))]
762+
#[cfg(any(target_os = "dragonfly", target_os = "freebsd",
763+
all(target_os = "linux", not(any(target_env = "musl", target_arch = "mips")))))]
762764
SeekHole = libc::SEEK_HOLE
763765
}
764766

0 commit comments

Comments
 (0)