Skip to content

Commit

Permalink
Fix the build on OSX with libc 0.2.49
Browse files Browse the repository at this point in the history
Several symbols are now marked as deprecated on OSX.
  • Loading branch information
asomers committed Mar 1, 2019
1 parent a2fa282 commit 7b9c25f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ This project adheres to [Semantic Versioning](http://semver.org/).
([#1020](https://github.com/nix-rust/nix/pull/1020))

### Removed
- `Daemon`, `NOTE_REAP`, and `NOTE_EXIT_REPARENTED` are now deprecated on OSX
and iOS.
([#1033](https://github.com/nix-rust/nix/pull/1033))

## [0.13.0] - 2019-01-15
### Added
Expand Down
3 changes: 3 additions & 0 deletions src/sys/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ libc_bitflags!(
NOTE_EXEC;
NOTE_EXIT;
#[cfg(any(target_os = "macos", target_os = "ios"))]
#[deprecated( since="0.14.0", note="Deprecated since OSX 10.9")]
NOTE_EXIT_REPARENTED;
#[cfg(any(target_os = "macos", target_os = "ios"))]
NOTE_EXITSTATUS;
Expand Down Expand Up @@ -183,6 +184,8 @@ libc_bitflags!(
NOTE_PCTRLMASK;
NOTE_PDATAMASK;
#[cfg(any(target_os = "macos", target_os = "ios"))]
#[cfg(any(target_os = "macos", target_os = "ios"))]
#[deprecated( since="0.14.0", note="Deprecated since OSX 10.9")]
NOTE_REAP;
NOTE_RENAME;
NOTE_REVOKE;
Expand Down
4 changes: 4 additions & 0 deletions src/unistd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -828,6 +828,10 @@ pub fn execveat(dirfd: RawFd, pathname: &CString, args: &[CString],
/// descriptors will remain identical after daemonizing.
/// * `noclose = false`: The process' stdin, stdout, and stderr will point to
/// `/dev/null` after daemonizing.
#[cfg_attr(any(target_os = "macos", target_os = "ios"), deprecated(
since="0.14.0",
note="Deprecated in MacOSX 10.5"
))]
pub fn daemon(nochdir: bool, noclose: bool) -> Result<()> {
let res = unsafe { libc::daemon(nochdir as c_int, noclose as c_int) };
Errno::result(res).map(drop)
Expand Down

0 comments on commit 7b9c25f

Please sign in to comment.