Skip to content

Commit 117ac87

Browse files
committed
Fix the build on OSX with libc 0.2.49
Several symbols are now marked as deprecated on OSX.
1 parent a2fa282 commit 117ac87

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/sys/event.rs

+3
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ libc_bitflags!(
135135
NOTE_EXEC;
136136
NOTE_EXIT;
137137
#[cfg(any(target_os = "macos", target_os = "ios"))]
138+
#[deprecated( since="0.14.0", note="Deprecated since OSX 10.9")]
138139
NOTE_EXIT_REPARENTED;
139140
#[cfg(any(target_os = "macos", target_os = "ios"))]
140141
NOTE_EXITSTATUS;
@@ -183,6 +184,8 @@ libc_bitflags!(
183184
NOTE_PCTRLMASK;
184185
NOTE_PDATAMASK;
185186
#[cfg(any(target_os = "macos", target_os = "ios"))]
187+
#[cfg(any(target_os = "macos", target_os = "ios"))]
188+
#[deprecated( since="0.14.0", note="Deprecated since OSX 10.9")]
186189
NOTE_REAP;
187190
NOTE_RENAME;
188191
NOTE_REVOKE;

src/unistd.rs

+4
Original file line numberDiff line numberDiff line change
@@ -828,6 +828,10 @@ pub fn execveat(dirfd: RawFd, pathname: &CString, args: &[CString],
828828
/// descriptors will remain identical after daemonizing.
829829
/// * `noclose = false`: The process' stdin, stdout, and stderr will point to
830830
/// `/dev/null` after daemonizing.
831+
#[cfg_attr(any(target_os = "macos", target_os = "ios"), deprecated(
832+
since="0.14.0",
833+
note="Deprecated in MacOSX 10.5"
834+
))]
831835
pub fn daemon(nochdir: bool, noclose: bool) -> Result<()> {
832836
let res = unsafe { libc::daemon(nochdir as c_int, noclose as c_int) };
833837
Errno::result(res).map(drop)

0 commit comments

Comments
 (0)