@@ -34,7 +34,6 @@ pub type nfds_t = c_uint;
3434pub type rlim_t = c_ulong ;
3535pub type dev_t = c_ulong ;
3636pub type ino_t = c_ulong ;
37- pub type ino64_t = u64 ;
3837pub type __CPU_BITTYPE = c_ulong ;
3938pub type idtype_t = c_int ;
4039pub type loff_t = c_longlong ;
@@ -48,6 +47,17 @@ pub type __u32 = c_uint;
4847pub type __s32 = c_int ;
4948pub type __be16 = __u16 ;
5049
50+ #[ cfg_attr(
51+ target_pointer_width = "64" ,
52+ deprecated(
53+ since = "0.2.187" ,
54+ note = "Use `ino_t` instead. Under 64-bit ABIs, Android aliases these types and the `libc` \
55+ crate is phasing out support for suffixed variants in favor of a single, \
56+ fixed-width unsuffixed type."
57+ )
58+ ) ]
59+ pub type ino64_t = u64 ;
60+
5161// linux/elf.h
5262
5363pub type Elf32_Addr = u32 ;
@@ -119,6 +129,15 @@ s! {
119129 pub l_pid: crate :: pid_t,
120130 }
121131
132+ #[ cfg_attr(
133+ target_pointer_width = "64" ,
134+ deprecated(
135+ since = "0.2.187" ,
136+ note = "Use `flock` instead. Under 64-bit ABIs, Android aliases these types, and the \
137+ `libc` crate is phasing out support for suffixed variants in favor of a single, \
138+ unsuffixed, fixed-width symbol."
139+ )
140+ ) ]
122141 pub struct flock64 {
123142 pub l_type: c_short,
124143 pub l_whence: c_short,
@@ -511,6 +530,12 @@ s! {
511530 pub d_name: [ c_char; 256 ] ,
512531 }
513532
533+ #[ deprecated(
534+ since = "0.2.187" ,
535+ note = "Use `dirent` instead. This type is defined as an alias to it and the `libc` crate \
536+ is phasing out support for suffixed types in favor of a single, fixed-width \
537+ unsuffixed type."
538+ ) ]
514539 pub struct dirent64 {
515540 pub d_ino: u64 ,
516541 pub d_off: i64 ,
@@ -3384,7 +3409,27 @@ extern "C" {
33843409 pub fn setgrent ( ) ;
33853410 pub fn endgrent ( ) ;
33863411 pub fn getgrent ( ) -> * mut crate :: group ;
3412+ #[ cfg_attr(
3413+ target_pointer_width = "64" ,
3414+ deprecated(
3415+ since = "0.2.187" ,
3416+ note = "Use `getrlimit` instead. Under 64-bit ABIs, Android aliases these types and the \
3417+ `libc` crate is phasing out support for suffixed variants in favor of a single, \
3418+ fixed-width, unsuffixed type."
3419+ ) ,
3420+ allow( deprecated)
3421+ ) ]
33873422 pub fn getrlimit64 ( resource : c_int , rlim : * mut rlimit64 ) -> c_int ;
3423+ #[ cfg_attr(
3424+ target_pointer_width = "64" ,
3425+ deprecated(
3426+ since = "0.2.187" ,
3427+ note = "Use `setrlimit` instead. Under 64-bit ABIs, Android aliases these types and the \
3428+ `libc` crate is phasing out support for suffixed variants in favor of a single, \
3429+ fixed-width, unsuffixed type."
3430+ ) ,
3431+ allow( deprecated)
3432+ ) ]
33883433 pub fn setrlimit64 ( resource : c_int , rlim : * const rlimit64 ) -> c_int ;
33893434 pub fn getrlimit ( resource : c_int , rlim : * mut crate :: rlimit ) -> c_int ;
33903435 pub fn setrlimit ( resource : c_int , rlim : * const crate :: rlimit ) -> c_int ;
@@ -3394,6 +3439,16 @@ extern "C" {
33943439 new_limit : * const crate :: rlimit ,
33953440 old_limit : * mut crate :: rlimit ,
33963441 ) -> c_int ;
3442+ #[ cfg_attr(
3443+ target_pointer_width = "64" ,
3444+ deprecated(
3445+ since = "0.2.187" ,
3446+ note = "Use `prlimit` instead. Under 64-bit ABIs, Android aliases these types and the \
3447+ `libc` crate is phasing out support for suffixed variants in favor of a single, \
3448+ fixed-width, unsuffixed type."
3449+ ) ,
3450+ allow( deprecated)
3451+ ) ]
33973452 pub fn prlimit64 (
33983453 pid : crate :: pid_t ,
33993454 resource : c_int ,
@@ -3454,8 +3509,28 @@ extern "C" {
34543509 pub fn seekdir ( dirp : * mut crate :: DIR , loc : c_long ) ;
34553510 pub fn telldir ( dirp : * mut crate :: DIR ) -> c_long ;
34563511 pub fn fallocate ( fd : c_int , mode : c_int , offset : off_t , len : off_t ) -> c_int ;
3512+ #[ cfg_attr(
3513+ target_pointer_width = "64" ,
3514+ deprecated(
3515+ since = "0.2.187" ,
3516+ note = "Use `fallocate` instead. Under 64-bit ABIs, Android aliases these types and \
3517+ the `libc` crate is phasing out support for suffixed variants in favor of a \
3518+ fixed-width unsuffixed type."
3519+ ) ,
3520+ allow( deprecated)
3521+ ) ]
34573522 pub fn fallocate64 ( fd : c_int , mode : c_int , offset : off64_t , len : off64_t ) -> c_int ;
34583523 pub fn posix_fallocate ( fd : c_int , offset : off_t , len : off_t ) -> c_int ;
3524+ #[ cfg_attr(
3525+ target_pointer_width = "64" ,
3526+ deprecated(
3527+ since = "0.2.187" ,
3528+ note = "Use `posix_fallocate` instead. Under 64-bit ABIs, Android aliases these types \
3529+ and the `libc` crate is phasing out support for suffixed variants in favor of \
3530+ a fixed-width unsuffixed type."
3531+ ) ,
3532+ allow( deprecated)
3533+ ) ]
34593534 pub fn posix_fallocate64 ( fd : c_int , offset : off64_t , len : off64_t ) -> c_int ;
34603535 pub fn getxattr (
34613536 path : * const c_char ,
@@ -3612,6 +3687,16 @@ extern "C" {
36123687 param : * const crate :: sched_param ,
36133688 ) -> c_int ;
36143689 pub fn sendfile ( out_fd : c_int , in_fd : c_int , offset : * mut off_t , count : size_t ) -> ssize_t ;
3690+ #[ cfg_attr(
3691+ target_pointer_width = "64" ,
3692+ deprecated(
3693+ since = "0.2.187" ,
3694+ note = "Use `sendfile` instead. Under 64-bit ABIs, Android aliases these types and the \
3695+ `libc` crate is phasing out support for suffixed variants in favor of a single \
3696+ unsuffixed type with a fixed bit-width."
3697+ ) ,
3698+ allow( deprecated)
3699+ ) ]
36153700 pub fn sendfile64 ( out_fd : c_int , in_fd : c_int , offset : * mut off64_t , count : size_t ) -> ssize_t ;
36163701 pub fn setfsgid ( gid : crate :: gid_t ) -> c_int ;
36173702 pub fn setfsuid ( uid : crate :: uid_t ) -> c_int ;
0 commit comments