@@ -29,7 +29,9 @@ type fs_type_t = libc::c_ulong;
29
29
type fs_type_t = libc:: c_uint ;
30
30
#[ cfg( all( target_os = "linux" , target_env = "musl" ) ) ]
31
31
type fs_type_t = libc:: c_ulong ;
32
- #[ cfg( all( target_os = "linux" , not( any( target_arch = "s390x" , target_env = "musl" ) ) ) ) ]
32
+ #[ cfg( all( target_os = "linux" , target_env = "uclibc" ) ) ]
33
+ type fs_type_t = libc:: c_int ;
34
+ #[ cfg( all( target_os = "linux" , not( any( target_arch = "s390x" , target_env = "musl" , target_env = "uclibc" ) ) ) ) ]
33
35
type fs_type_t = libc:: __fsword_t ;
34
36
35
37
/// Describes the file system type as known by the operating system.
@@ -181,11 +183,17 @@ impl Statfs {
181
183
}
182
184
183
185
/// Optimal transfer block size
184
- #[ cfg( all( target_os = "linux" , not( any( target_arch = "s390x" , target_env = "musl" ) ) ) ) ]
186
+ #[ cfg( all( target_os = "linux" , not( any( target_arch = "s390x" , target_env = "musl" , target_env = "uclibc" ) ) ) ) ]
185
187
pub fn optimal_transfer_size ( & self ) -> libc:: __fsword_t {
186
188
self . 0 . f_bsize
187
189
}
188
190
191
+ /// Optimal transfer block size
192
+ #[ cfg( all( target_os = "linux" , target_env = "uclibc" ) ) ]
193
+ pub fn optimal_transfer_size ( & self ) -> libc:: c_int {
194
+ self . 0 . f_bsize
195
+ }
196
+
189
197
/// Optimal transfer block size
190
198
#[ cfg( target_os = "dragonfly" ) ]
191
199
pub fn optimal_transfer_size ( & self ) -> libc:: c_long {
@@ -220,7 +228,14 @@ impl Statfs {
220
228
221
229
/// Size of a block
222
230
// f_bsize on linux: https://github.com/torvalds/linux/blob/master/fs/nfs/super.c#L471
223
- #[ cfg( all( target_os = "linux" , not( any( target_arch = "s390x" , target_env = "musl" ) ) ) ) ]
231
+ #[ cfg( all( target_os = "linux" , target_env = "uclibc" ) ) ]
232
+ pub fn block_size ( & self ) -> libc:: c_int {
233
+ self . 0 . f_bsize
234
+ }
235
+
236
+ /// Size of a block
237
+ // f_bsize on linux: https://github.com/torvalds/linux/blob/master/fs/nfs/super.c#L471
238
+ #[ cfg( all( target_os = "linux" , not( any( target_arch = "s390x" , target_env = "musl" , target_env = "uclibc" ) ) ) ) ]
224
239
pub fn block_size ( & self ) -> libc:: __fsword_t {
225
240
self . 0 . f_bsize
226
241
}
@@ -262,7 +277,13 @@ impl Statfs {
262
277
}
263
278
264
279
/// Maximum length of filenames
265
- #[ cfg( all( target_os = "linux" , not( any( target_arch = "s390x" , target_env = "musl" ) ) ) ) ]
280
+ #[ cfg( all( target_os = "linux" , target_env = "uclibc" ) ) ]
281
+ pub fn maximum_name_length ( & self ) -> libc:: c_int {
282
+ self . 0 . f_namelen
283
+ }
284
+
285
+ /// Maximum length of filenames
286
+ #[ cfg( all( target_os = "linux" , not( any( target_arch = "s390x" , target_env = "musl" , target_env = "uclibc" ) ) ) ) ]
266
287
pub fn maximum_name_length ( & self ) -> libc:: __fsword_t {
267
288
self . 0 . f_namelen
268
289
}
0 commit comments