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 117ac87
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
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 117ac87

Please sign in to comment.