Skip to content

Commit 645309d

Browse files
bors[bot]Amanieuasomers
authored
Merge #1284
1284: Expose SeekData and SeekHole on all Linux targets r=asomers a=Amanieu These were previously missing on musl and mips targets because of missing definitions in the libc crate. Co-authored-by: Amanieu d'Antras <[email protected]> Co-authored-by: Alan Somers <[email protected]>
2 parents 8ab88ee + baab9c4 commit 645309d

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@ All notable changes to this project will be documented in this file.
44
This project adheres to [Semantic Versioning](http://semver.org/).
55

66
## [Unreleased] - ReleaseDate
7+
### Added
78
- Added Netlink protocol families to the `SockProtocol` enum
89
(#[1289](https://github.com/nix-rust/nix/pull/1289))
9-
### Added
1010
### Changed
11+
- Expose `SeekData` and `SeekHole` on all Linux targets
12+
(#[1284](https://github.com/nix-rust/nix/pull/1284))
1113
- Changed unistd::{execv,execve,execvp,execvpe,fexecve,execveat} to take both `&[&CStr]` and `&[CString]` as its list argument(s).
1214
(#[1278](https://github.com/nix-rust/nix/pull/1278))
1315
### Fixed

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)