Skip to content

Commit 1b8a026

Browse files
committed
Add support for QNX Neutrino 7.1
1 parent 213127b commit 1b8a026

File tree

17 files changed

+543
-104
lines changed

17 files changed

+543
-104
lines changed

build.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,12 @@ fn main() {
1414
solaris: { target_os = "solaris" },
1515
watchos: { target_os = "watchos" },
1616
tvos: { target_os = "tvos" },
17+
nto_qnx: { target_os = "nto"},
1718

1819

1920
// cfg aliases we would like to use
2021
apple_targets: { any(ios, macos, watchos, tvos) },
21-
bsd: { any(freebsd, dragonfly, netbsd, openbsd, apple_targets) },
22+
bsd: { any(freebsd, dragonfly, netbsd, openbsd, apple_targets, nto_qnx) },
2223
bsd_without_apple: { any(freebsd, dragonfly, netbsd, openbsd) },
2324
linux_android: { any(android, linux) },
2425
freebsdlike: { any(dragonfly, freebsd) },

src/dir.rs

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,7 @@ impl Entry {
228228
target_os = "emscripten",
229229
target_os = "fuchsia",
230230
target_os = "haiku",
231+
target_os = "nto",
231232
target_os = "hurd",
232233
solarish,
233234
linux_android,
@@ -250,7 +251,12 @@ impl Entry {
250251
/// notably, some Linux filesystems don't implement this. The caller should use `stat` or
251252
/// `fstat` if this returns `None`.
252253
pub fn file_type(&self) -> Option<Type> {
253-
#[cfg(not(any(solarish, target_os = "aix", target_os = "haiku")))]
254+
#[cfg(not(any(
255+
solarish,
256+
target_os = "aix",
257+
target_os = "haiku",
258+
target_os = "nto",
259+
)))]
254260
match self.0.d_type {
255261
libc::DT_FIFO => Some(Type::Fifo),
256262
libc::DT_CHR => Some(Type::CharacterDevice),
@@ -263,7 +269,12 @@ impl Entry {
263269
}
264270

265271
// illumos, Solaris, and Haiku systems do not have the d_type member at all:
266-
#[cfg(any(solarish, target_os = "aix", target_os = "haiku"))]
272+
#[cfg(any(
273+
solarish,
274+
target_os = "aix",
275+
target_os = "haiku",
276+
target_os = "nto",
277+
))]
267278
None
268279
}
269280
}

0 commit comments

Comments
 (0)