Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose SeekData and SeekHole on all Linux targets #1284

Merged
merged 3 commits into from
Aug 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased] - ReleaseDate
### Added
- Added Netlink protocol families to the `SockProtocol` enum
(#[1289](https://github.com/nix-rust/nix/pull/1289))
### Added
### Changed
- Expose `SeekData` and `SeekHole` on all Linux targets
(#[1284](https://github.com/nix-rust/nix/pull/1284))
- Changed unistd::{execv,execve,execvp,execvpe,fexecve,execveat} to take both `&[&CStr]` and `&[CString]` as its list argument(s).
(#[1278](https://github.com/nix-rust/nix/pull/1278))
### Fixed
Expand Down
10 changes: 2 additions & 8 deletions src/unistd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1018,20 +1018,14 @@ pub enum Whence {
/// Specify an offset relative to the next location in the file greater than or
/// equal to offset that contains some data. If offset points to
/// some data, then the file offset is set to offset.
#[cfg(any(target_os = "dragonfly", target_os = "freebsd",
all(target_os = "linux", not(any(target_env = "musl",
target_arch = "mips",
target_arch = "mips64")))))]
#[cfg(any(target_os = "dragonfly", target_os = "freebsd", target_os = "linux"))]
SeekData = libc::SEEK_DATA,
/// Specify an offset relative to the next hole in the file greater than
/// or equal to offset. If offset points into the middle of a hole, then
/// the file offset should be set to offset. If there is no hole past offset,
/// 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(target_os = "dragonfly", target_os = "freebsd",
all(target_os = "linux", not(any(target_env = "musl",
target_arch = "mips",
target_arch = "mips64")))))]
#[cfg(any(target_os = "dragonfly", target_os = "freebsd", target_os = "linux"))]
SeekHole = libc::SEEK_HOLE
}

Expand Down