summaryrefslogtreecommitdiff
path: root/src/dir.rs
diff options
context:
space:
mode:
authorAl Hoang <3811822-hoanga@users.noreply.gitlab.com>2022-04-22 23:56:51 -0500
committerAl Hoang <3811822-hoanga@users.noreply.gitlab.com>2022-05-14 18:45:18 -0500
commitd02e27476cbf23b6818e57e017fd6148a98b7a92 (patch)
tree2e8bfe3a60c65393dd35224fe20bd3be51a77308 /src/dir.rs
parent69738c0fd03af19053c5701a984f923ecbbfada6 (diff)
downloadnix-d02e27476cbf23b6818e57e017fd6148a98b7a92.zip
add haiku support
* enabled as much functionality and defines that match updated libc definitions for haiku
Diffstat (limited to 'src/dir.rs')
-rw-r--r--src/dir.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/dir.rs b/src/dir.rs
index 396b54fb..c9b5af8f 100644
--- a/src/dir.rs
+++ b/src/dir.rs
@@ -226,7 +226,7 @@ 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(target_os = "illumos", target_os = "solaris")))]
+ #[cfg(not(any(target_os = "illumos", target_os = "solaris", target_os = "haiku")))]
match self.0.d_type {
libc::DT_FIFO => Some(Type::Fifo),
libc::DT_CHR => Some(Type::CharacterDevice),
@@ -238,8 +238,8 @@ impl Entry {
/* libc::DT_UNKNOWN | */ _ => None,
}
- // illumos and Solaris systems do not have the d_type member at all:
- #[cfg(any(target_os = "illumos", target_os = "solaris"))]
+ // illumos, Solaris, and Haiku systems do not have the d_type member at all:
+ #[cfg(any(target_os = "illumos", target_os = "solaris", target_os = "haiku"))]
None
}
}