Skip to content

Add support for QNX Neutrino 7.1 #2055

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@ fn main() {
watchos: { target_os = "watchos" },
tvos: { target_os = "tvos" },
visionos: { target_os = "visionos" },
nto_qnx: { target_os = "nto"},


// cfg aliases we would like to use
apple_targets: { any(ios, macos, watchos, tvos, visionos) },
bsd: { any(freebsd, dragonfly, netbsd, openbsd, apple_targets) },
bsd: { any(freebsd, dragonfly, netbsd, openbsd, apple_targets, nto_qnx) },
bsd_without_apple: { any(freebsd, dragonfly, netbsd, openbsd) },
linux_android: { any(android, linux) },
freebsdlike: { any(dragonfly, freebsd) },
Expand Down
15 changes: 13 additions & 2 deletions src/dir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ impl Entry {
target_os = "emscripten",
target_os = "fuchsia",
target_os = "haiku",
target_os = "nto",
target_os = "hurd",
solarish,
linux_android,
Expand All @@ -250,7 +251,12 @@ impl Entry {
/// notably, some Linux filesystems don't implement this. The caller should use `stat` or
/// `fstat` if this returns `None`.
pub fn file_type(&self) -> Option<Type> {
#[cfg(not(any(solarish, target_os = "aix", target_os = "haiku")))]
#[cfg(not(any(
solarish,
target_os = "aix",
target_os = "haiku",
target_os = "nto",
)))]
match self.0.d_type {
libc::DT_FIFO => Some(Type::Fifo),
libc::DT_CHR => Some(Type::CharacterDevice),
Expand All @@ -263,7 +269,12 @@ impl Entry {
}

// illumos, Solaris, and Haiku systems do not have the d_type member at all:
#[cfg(any(solarish, target_os = "aix", target_os = "haiku"))]
#[cfg(any(
solarish,
target_os = "aix",
target_os = "haiku",
target_os = "nto",
))]
None
}
}
Loading
Loading