@@ -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 ,
@@ -3385,7 +3410,27 @@ extern "C" {
33853410 pub fn setgrent ( ) ;
33863411 pub fn endgrent ( ) ;
33873412 pub fn getgrent ( ) -> * mut crate :: group ;
3413+ #[ cfg_attr(
3414+ target_pointer_width = "64" ,
3415+ deprecated(
3416+ since = "0.2.187" ,
3417+ note = "Use `getrlimit` instead. Under 64-bit ABIs, Android aliases these types and the \
3418+ `libc` crate is phasing out support for suffixed variants in favor of a single, \
3419+ fixed-width, unsuffixed type."
3420+ ) ,
3421+ allow( deprecated)
3422+ ) ]
33883423 pub fn getrlimit64 ( resource : c_int , rlim : * mut rlimit64 ) -> c_int ;
3424+ #[ cfg_attr(
3425+ target_pointer_width = "64" ,
3426+ deprecated(
3427+ since = "0.2.187" ,
3428+ note = "Use `setrlimit` instead. Under 64-bit ABIs, Android aliases these types and the \
3429+ `libc` crate is phasing out support for suffixed variants in favor of a single, \
3430+ fixed-width, unsuffixed type."
3431+ ) ,
3432+ allow( deprecated)
3433+ ) ]
33893434 pub fn setrlimit64 ( resource : c_int , rlim : * const rlimit64 ) -> c_int ;
33903435 pub fn getrlimit ( resource : c_int , rlim : * mut crate :: rlimit ) -> c_int ;
33913436 pub fn setrlimit ( resource : c_int , rlim : * const crate :: rlimit ) -> c_int ;
@@ -3395,6 +3440,16 @@ extern "C" {
33953440 new_limit : * const crate :: rlimit ,
33963441 old_limit : * mut crate :: rlimit ,
33973442 ) -> c_int ;
3443+ #[ cfg_attr(
3444+ target_pointer_width = "64" ,
3445+ deprecated(
3446+ since = "0.2.187" ,
3447+ note = "Use `prlimit` instead. Under 64-bit ABIs, Android aliases these types and the \
3448+ `libc` crate is phasing out support for suffixed variants in favor of a single, \
3449+ fixed-width, unsuffixed type."
3450+ ) ,
3451+ allow( deprecated)
3452+ ) ]
33983453 pub fn prlimit64 (
33993454 pid : crate :: pid_t ,
34003455 resource : c_int ,
@@ -3455,8 +3510,28 @@ extern "C" {
34553510 pub fn seekdir ( dirp : * mut crate :: DIR , loc : c_long ) ;
34563511 pub fn telldir ( dirp : * mut crate :: DIR ) -> c_long ;
34573512 pub fn fallocate ( fd : c_int , mode : c_int , offset : off_t , len : off_t ) -> c_int ;
3513+ #[ cfg_attr(
3514+ target_pointer_width = "64" ,
3515+ deprecated(
3516+ since = "0.2.187" ,
3517+ note = "Use `fallocate` instead. Under 64-bit ABIs, Android aliases these types and \
3518+ the `libc` crate is phasing out support for suffixed variants in favor of a \
3519+ fixed-width unsuffixed type."
3520+ ) ,
3521+ allow( deprecated)
3522+ ) ]
34583523 pub fn fallocate64 ( fd : c_int , mode : c_int , offset : off64_t , len : off64_t ) -> c_int ;
34593524 pub fn posix_fallocate ( fd : c_int , offset : off_t , len : off_t ) -> c_int ;
3525+ #[ cfg_attr(
3526+ target_pointer_width = "64" ,
3527+ deprecated(
3528+ since = "0.2.187" ,
3529+ note = "Use `posix_fallocate` instead. Under 64-bit ABIs, Android aliases these types \
3530+ and the `libc` crate is phasing out support for suffixed variants in favor of \
3531+ a fixed-width unsuffixed type."
3532+ ) ,
3533+ allow( deprecated)
3534+ ) ]
34603535 pub fn posix_fallocate64 ( fd : c_int , offset : off64_t , len : off64_t ) -> c_int ;
34613536 pub fn getxattr (
34623537 path : * const c_char ,
@@ -3613,6 +3688,16 @@ extern "C" {
36133688 param : * const crate :: sched_param ,
36143689 ) -> c_int ;
36153690 pub fn sendfile ( out_fd : c_int , in_fd : c_int , offset : * mut off_t , count : size_t ) -> ssize_t ;
3691+ #[ cfg_attr(
3692+ target_pointer_width = "64" ,
3693+ deprecated(
3694+ since = "0.2.187" ,
3695+ note = "Use `sendfile` instead. Under 64-bit ABIs, Android aliases these types and the \
3696+ `libc` crate is phasing out support for suffixed variants in favor of a single \
3697+ unsuffixed type with a fixed bit-width."
3698+ ) ,
3699+ allow( deprecated)
3700+ ) ]
36163701 pub fn sendfile64 ( out_fd : c_int , in_fd : c_int , offset : * mut off64_t , count : size_t ) -> ssize_t ;
36173702 pub fn setfsgid ( gid : crate :: gid_t ) -> c_int ;
36183703 pub fn setfsuid ( uid : crate :: uid_t ) -> c_int ;
0 commit comments