@@ -29,7 +29,9 @@ type fs_type_t = libc::c_ulong;
2929type fs_type_t = libc:: c_uint ;
3030#[ cfg( all( target_os = "linux" , target_env = "musl" ) ) ]
3131type 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" ) ) ) ) ]
3335type fs_type_t = libc:: __fsword_t ;
3436
3537/// Describes the file system type as known by the operating system.
@@ -181,11 +183,17 @@ impl Statfs {
181183 }
182184
183185 /// 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" ) ) ) ) ]
185187 pub fn optimal_transfer_size ( & self ) -> libc:: __fsword_t {
186188 self . 0 . f_bsize
187189 }
188190
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+
189197 /// Optimal transfer block size
190198 #[ cfg( target_os = "dragonfly" ) ]
191199 pub fn optimal_transfer_size ( & self ) -> libc:: c_long {
@@ -220,7 +228,14 @@ impl Statfs {
220228
221229 /// Size of a block
222230 // 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" ) ) ) ) ]
224239 pub fn block_size ( & self ) -> libc:: __fsword_t {
225240 self . 0 . f_bsize
226241 }
@@ -262,7 +277,13 @@ impl Statfs {
262277 }
263278
264279 /// 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" ) ) ) ) ]
266287 pub fn maximum_name_length ( & self ) -> libc:: __fsword_t {
267288 self . 0 . f_namelen
268289 }
0 commit comments