Fix compilation for a few tier 2 targets

This commit is contained in:
Hans Kratz 2022-01-20 12:43:54 +01:00 committed by Pietro Albini
parent 32080ad6d0
commit 0a6c9adc4a
No known key found for this signature in database
GPG Key ID: CD76B35F7734769E

View File

@ -670,12 +670,7 @@ fn name_bytes(&self) -> &[u8] {
fn name_cstr(&self) -> &CStr {
unsafe { CStr::from_ptr(self.entry.d_name.as_ptr()) }
}
#[cfg(any(
target_os = "solaris",
target_os = "illumos",
target_os = "fuchsia",
target_os = "redox"
))]
#[cfg(any(target_os = "solaris", target_os = "illumos", target_os = "fuchsia"))]
fn name_cstr(&self) -> &CStr {
&self.name
}
@ -1631,7 +1626,8 @@ fn fdreaddir(dir_fd: OwnedFd) -> io::Result<(ReadDir, RawFd)> {
target_os = "solaris",
target_os = "illumos",
target_os = "haiku",
target_os = "vxworks"
target_os = "vxworks",
target_os = "fuchsia"
))]
fn is_dir(_ent: &DirEntry) -> Option<bool> {
None
@ -1641,7 +1637,8 @@ fn is_dir(_ent: &DirEntry) -> Option<bool> {
target_os = "solaris",
target_os = "illumos",
target_os = "haiku",
target_os = "vxworks"
target_os = "vxworks",
target_os = "fuchsia"
)))]
fn is_dir(ent: &DirEntry) -> Option<bool> {
match ent.entry.d_type {