@@ -18,6 +18,14 @@ pub type dev_t = u64;
1818pub type socklen_t = u32 ;
1919pub type mode_t = u32 ;
2020pub type ino64_t = u64 ;
21+ #[ cfg_attr(
22+ any( target_env = "musl" , target_env = "ohos" ) ,
23+ deprecated(
24+ since = "0.2.187" ,
25+ note = "Use `off_t` instead. This type is `#define`d as an alias to `off_t` in upstream \
26+ musl and support for the suffixed variants is phasing out in `libc`."
27+ )
28+ ) ]
2129pub type off64_t = i64 ;
2230pub type blkcnt64_t = i64 ;
2331pub type rlim64_t = u64 ;
@@ -3479,7 +3487,10 @@ extern "C" {
34793487 pub fn fallocate ( fd : c_int , mode : c_int , offset : off_t , len : off_t ) -> c_int ;
34803488 #[ cfg_attr( gnu_file_offset_bits64, link_name = "posix_fallocate64" ) ]
34813489 pub fn posix_fallocate ( fd : c_int , offset : off_t , len : off_t ) -> c_int ;
3490+ #[ cfg( not( any( target_env = "musl" , target_env = "ohos" ) ) ) ]
34823491 pub fn readahead ( fd : c_int , offset : off64_t , count : size_t ) -> ssize_t ;
3492+ #[ cfg( any( target_env = "musl" , target_env = "ohos" ) ) ]
3493+ pub fn readahead ( fd : c_int , offset : off_t , count : size_t ) -> ssize_t ;
34833494 pub fn getxattr (
34843495 path : * const c_char ,
34853496 name : * const c_char ,
@@ -3567,7 +3578,10 @@ extern "C" {
35673578
35683579 // Not available now on Android
35693580 pub fn mkfifoat ( dirfd : c_int , pathname : * const c_char , mode : mode_t ) -> c_int ;
3581+ #[ cfg( not( any( target_env = "musl" , target_env = "ohos" ) ) ) ]
35703582 pub fn sync_file_range ( fd : c_int , offset : off64_t , nbytes : off64_t , flags : c_uint ) -> c_int ;
3583+ #[ cfg( any( target_env = "musl" , target_env = "ohos" ) ) ]
3584+ pub fn sync_file_range ( fd : c_int , offset : off_t , nbytes : off_t , flags : c_uint ) -> c_int ;
35713585
35723586 pub fn posix_madvise ( addr : * mut c_void , len : size_t , advice : c_int ) -> c_int ;
35733587
0 commit comments