Skip to content

Commit 90b8733

Browse files
committed
Fix build on NetBSD and Apple
1 parent 66fa007 commit 90b8733

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/unistd.rs

+8
Original file line numberDiff line numberDiff line change
@@ -828,6 +828,8 @@ pub fn mkstemp<P: ?Sized + NixPath>(template: &P) -> Result<(RawFd, PathBuf)> {
828828
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
829829
#[repr(i32)]
830830
pub enum PathconfVar {
831+
#[cfg(any(target_os = "dragonfly", target_os = "freebsd", target_os = "linux",
832+
target_os = "netbsd", target_os = "openbsd"))]
831833
FILESIZEBITS = libc::_PC_FILESIZEBITS,
832834
LINK_MAX = libc::_PC_LINK_MAX,
833835
MAX_CANON = libc::_PC_MAX_CANON,
@@ -1016,6 +1018,9 @@ _POSIX_RAW_SOCKETS = libc::_SC_RAW_SOCKETS,
10161018
target_os="linux", target_os = "macos", target_os="netbsd",
10171019
target_os="openbsd"))]
10181020
_POSIX_READER_WRITER_LOCKS = libc::_SC_READER_WRITER_LOCKS,
1021+
#[cfg(any(target_os = "android", target_os="dragonfly", target_os="freebsd",
1022+
target_os = "ios", target_os="linux", target_os = "macos",
1023+
target_os = "openbsd"))]
10191024
_POSIX_REALTIME_SIGNALS = libc::_SC_REALTIME_SIGNALS,
10201025
#[cfg(any(target_os="dragonfly", target_os="freebsd", target_os = "ios",
10211026
target_os="linux", target_os = "macos", target_os="netbsd",
@@ -1162,6 +1167,9 @@ SEM_NSEMS_MAX = libc::_SC_SEM_NSEMS_MAX,
11621167
target_os = "ios", target_os="linux", target_os = "macos",
11631168
target_os="openbsd"))]
11641169
SEM_VALUE_MAX = libc::_SC_SEM_VALUE_MAX,
1170+
#[cfg(any(target_os = "android", target_os="dragonfly", target_os="freebsd",
1171+
target_os = "ios", target_os="linux", target_os = "macos",
1172+
target_os = "openbsd"))]
11651173
SIGQUEUE_MAX = libc::_SC_SIGQUEUE_MAX,
11661174
STREAM_MAX = libc::_SC_STREAM_MAX,
11671175
#[cfg(any(target_os="dragonfly", target_os="freebsd", target_os = "ios",

0 commit comments

Comments
 (0)