@@ -192,6 +192,7 @@ impl Entry {
192
192
target_os = "emscripten" ,
193
193
target_os = "fuchsia" ,
194
194
target_os = "haiku" ,
195
+ target_os = "illumos" ,
195
196
target_os = "ios" ,
196
197
target_os = "l4re" ,
197
198
target_os = "linux" ,
@@ -206,6 +207,7 @@ impl Entry {
206
207
target_os = "emscripten" ,
207
208
target_os = "fuchsia" ,
208
209
target_os = "haiku" ,
210
+ target_os = "illumos" ,
209
211
target_os = "ios" ,
210
212
target_os = "l4re" ,
211
213
target_os = "linux" ,
@@ -225,7 +227,9 @@ impl Entry {
225
227
/// See platform `readdir(3)` or `dirent(5)` manpage for when the file type is known;
226
228
/// notably, some Linux filesystems don't implement this. The caller should use `stat` or
227
229
/// `fstat` if this returns `None`.
230
+ #[ cfg( not( any( target_os = "illumos" , target_os = "solaris" ) ) ) ]
228
231
pub fn file_type ( & self ) -> Option < Type > {
232
+ #[ cfg( not( target_os = "illumos" ) ) ]
229
233
match self . 0 . d_type {
230
234
libc:: DT_FIFO => Some ( Type :: Fifo ) ,
231
235
libc:: DT_CHR => Some ( Type :: CharacterDevice ) ,
@@ -236,5 +240,14 @@ impl Entry {
236
240
libc:: DT_SOCK => Some ( Type :: Socket ) ,
237
241
/* libc::DT_UNKNOWN | */ _ => None ,
238
242
}
243
+
244
+ // illumos systems do not have the d_type member at all:
245
+ #[ cfg( target_os = "illumos" ) ]
246
+ None
247
+ }
248
+
249
+ #[ cfg( any( target_os = "illumos" , target_os = "solaris" ) ) ]
250
+ pub fn file_type ( & self ) -> Option < Type > {
251
+ None
239
252
}
240
253
}
0 commit comments