@@ -106,19 +106,28 @@ impl Statfs {
106106 }
107107
108108 /// Optimal transfer block size
109- #[ cfg( any( target_os = "ios" , target_os = "macos" , target_os = "openbsd" ) ) ]
109+ #[ cfg( any( target_os = "ios" , target_os = "macos" ) ) ]
110110 pub fn optimal_transfer_size ( & self ) -> i32 {
111111 self . 0 . f_iosize
112112 }
113113
114+ /// Optimal transfer block size
115+ #[ cfg( target_os = "openbsd" ) ]
116+ pub fn optimal_transfer_size ( & self ) -> u32 {
117+ self . 0 . f_iosize
118+ }
119+
114120 /// Optimal transfer block size
115121 #[ cfg( all( target_os = "linux" , target_arch = "s390x" ) ) ]
116122 pub fn optimal_transfer_size ( & self ) -> u32 {
117123 self . 0 . f_bsize
118124 }
119125
120126 /// Optimal transfer block size
121- #[ cfg( all( target_os = "linux" , target_env = "musl" ) ) ]
127+ #[ cfg( any(
128+ target_os = "android" ,
129+ all( target_os = "linux" , target_env = "musl" )
130+ ) ) ]
122131 pub fn optimal_transfer_size ( & self ) -> libc:: c_ulong {
123132 self . 0 . f_bsize
124133 }
@@ -129,12 +138,6 @@ impl Statfs {
129138 self . 0 . f_bsize
130139 }
131140
132- /// Optimal transfer block size
133- #[ cfg( target_os = "android" ) ]
134- pub fn optimal_transfer_size ( & self ) -> libc:: c_ulong {
135- self . 0 . f_bsize
136- }
137-
138141 /// Optimal transfer block size
139142 #[ cfg( target_os = "dragonfly" ) ]
140143 pub fn optimal_transfer_size ( & self ) -> libc:: c_long {
@@ -375,7 +378,13 @@ impl Statfs {
375378 }
376379
377380 /// Free file nodes in filesystem
378- #[ cfg( any( target_os = "ios" , target_os = "macos" , target_os = "android" ) ) ]
381+ #[ cfg( any(
382+ target_os = "android" ,
383+ target_os = "ios" ,
384+ all( target_os = "linux" , target_env = "musl" ) ,
385+ target_os = "macos" ,
386+ target_os = "openbsd"
387+ ) ) ]
379388 pub fn files_free ( & self ) -> u64 {
380389 self . 0 . f_ffree
381390 }
@@ -387,17 +396,11 @@ impl Statfs {
387396 }
388397
389398 /// Free file nodes in filesystem
390- #[ cfg( any ( target_os = "freebsd" , target_os = "openbsd" ) ) ]
399+ #[ cfg( target_os = "freebsd" ) ]
391400 pub fn files_free ( & self ) -> i64 {
392401 self . 0 . f_ffree
393402 }
394403
395- /// Free file nodes in filesystem
396- #[ cfg( all( target_os = "linux" , target_env = "musl" ) ) ]
397- pub fn files_free ( & self ) -> u64 {
398- self . 0 . f_ffree
399- }
400-
401404 /// Free file nodes in filesystem
402405 #[ cfg( not( any(
403406 target_os = "ios" ,
0 commit comments