Skip to content

Commit 04e7551

Browse files
committed
Fix the build on OSX with libc 0.2.49
Several symbols are now marked as deprecated on OSX. Fix the build by marking these symbols' Nix wrappers as deprecated, too.
1 parent a2fa282 commit 04e7551

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ This project adheres to [Semantic Versioning](http://semver.org/).
2929
([#1020](https://github.com/nix-rust/nix/pull/1020))
3030

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

3336
## [0.13.0] - 2019-01-15
3437
### Added

src/sys/event.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,8 @@ 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")]
139+
#[allow(deprecated)]
138140
NOTE_EXIT_REPARENTED;
139141
#[cfg(any(target_os = "macos", target_os = "ios"))]
140142
NOTE_EXITSTATUS;
@@ -183,6 +185,9 @@ libc_bitflags!(
183185
NOTE_PCTRLMASK;
184186
NOTE_PDATAMASK;
185187
#[cfg(any(target_os = "macos", target_os = "ios"))]
188+
#[cfg(any(target_os = "macos", target_os = "ios"))]
189+
#[deprecated( since="0.14.0", note="Deprecated since OSX 10.9")]
190+
#[allow(deprecated)]
186191
NOTE_REAP;
187192
NOTE_RENAME;
188193
NOTE_REVOKE;

src/unistd.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -828,6 +828,11 @@ 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+
))]
835+
#[cfg_attr(any(target_os = "macos", target_os = "ios"), allow(deprecated))]
831836
pub fn daemon(nochdir: bool, noclose: bool) -> Result<()> {
832837
let res = unsafe { libc::daemon(nochdir as c_int, noclose as c_int) };
833838
Errno::result(res).map(drop)

0 commit comments

Comments
 (0)