@@ -525,25 +525,6 @@ s! {
525525 }
526526}
527527
528- cfg_if ! {
529- if #[ cfg( not( target_env = "uclibc" ) ) ] {
530- s! {
531- pub struct Elf64_Chdr {
532- pub ch_type: Elf64_Word ,
533- pub ch_reserved: Elf64_Word ,
534- pub ch_size: Elf64_Xword ,
535- pub ch_addralign: Elf64_Xword ,
536- }
537-
538- pub struct Elf32_Chdr {
539- pub ch_type: Elf32_Word ,
540- pub ch_size: Elf32_Word ,
541- pub ch_addralign: Elf32_Word ,
542- }
543- }
544- }
545- }
546-
547528s_no_extra_traits ! {
548529 pub struct sockaddr_nl {
549530 pub nl_family: :: sa_family_t,
@@ -983,13 +964,7 @@ cfg_if! {
983964 }
984965}
985966
986- cfg_if ! {
987- if #[ cfg( not( target_env = "uclibc" ) ) ] {
988- pub const RUSAGE_THREAD : :: c_int = 1 ;
989- }
990- }
991967pub const RUSAGE_CHILDREN : :: c_int = -1 ;
992-
993968pub const L_tmpnam : :: c_uint = 20 ;
994969pub const _PC_LINK_MAX: :: c_int = 0 ;
995970pub const _PC_MAX_CANON: :: c_int = 1 ;
@@ -1323,8 +1298,6 @@ pub const RTLD_NOW: ::c_int = 0x2;
13231298pub const AT_EACCESS : :: c_int = 0x200 ;
13241299
13251300pub const TCP_MD5SIG : :: c_int = 14 ;
1326- #[ cfg( not( target_env = "uclibc" ) ) ]
1327- pub const TCP_ULP : :: c_int = 31 ;
13281301
13291302align_const ! {
13301303 pub const PTHREAD_MUTEX_INITIALIZER : pthread_mutex_t = pthread_mutex_t {
@@ -1386,17 +1359,13 @@ pub const MSG_INFO: ::c_int = 12;
13861359
13871360pub const MSG_NOERROR : :: c_int = 0o10000 ;
13881361pub const MSG_EXCEPT : :: c_int = 0o20000 ;
1389- #[ cfg( not( target_env = "uclibc" ) ) ]
1390- pub const MSG_COPY : :: c_int = 0o40000 ;
13911362
13921363pub const SHM_R : :: c_int = 0o400 ;
13931364pub const SHM_W : :: c_int = 0o200 ;
13941365
13951366pub const SHM_RDONLY : :: c_int = 0o10000 ;
13961367pub const SHM_RND : :: c_int = 0o20000 ;
13971368pub const SHM_REMAP : :: c_int = 0o40000 ;
1398- #[ cfg( not( target_env = "uclibc" ) ) ]
1399- pub const SHM_EXEC : :: c_int = 0o100000 ;
14001369
14011370pub const SHM_LOCK : :: c_int = 11 ;
14021371pub const SHM_UNLOCK : :: c_int = 12 ;
@@ -1406,8 +1375,6 @@ pub const SHM_HUGETLB: ::c_int = 0o4000;
14061375pub const SHM_NORESERVE : :: c_int = 0o10000 ;
14071376
14081377pub const EPOLLRDHUP : :: c_int = 0x2000 ;
1409- #[ cfg( not( target_env = "uclibc" ) ) ]
1410- pub const EPOLLEXCLUSIVE : :: c_int = 0x10000000 ;
14111378pub const EPOLLONESHOT : :: c_int = 0x40000000 ;
14121379
14131380pub const QFMT_VFS_OLD : :: c_int = 1 ;
@@ -1469,6 +1436,16 @@ cfg_if! {
14691436 pub const LIO_NOP : :: c_int = 2 ;
14701437 pub const LIO_WAIT : :: c_int = 0 ;
14711438 pub const LIO_NOWAIT : :: c_int = 1 ;
1439+ pub const RUSAGE_THREAD : :: c_int = 1 ;
1440+ pub const TCP_ULP : :: c_int = 31 ;
1441+ pub const MSG_COPY : :: c_int = 0o40000 ;
1442+ pub const SHM_EXEC : :: c_int = 0o100000 ;
1443+ pub const IPV6_MULTICAST_ALL : :: c_int = 29 ;
1444+ pub const IPV6_ROUTER_ALERT_ISOLATE : :: c_int = 30 ;
1445+ pub const PACKET_MR_UNICAST : :: c_int = 3 ;
1446+ pub const PTRACE_EVENT_STOP : :: c_int = 128 ;
1447+ pub const UDP_SEGMENT : :: c_int = 103 ;
1448+ pub const UDP_GRO : :: c_int = 104 ;
14721449 }
14731450}
14741451
@@ -1633,10 +1610,6 @@ pub const SO_ORIGINAL_DST: ::c_int = 80;
16331610pub const IP_RECVFRAGSIZE : :: c_int = 25 ;
16341611
16351612pub const IPV6_FLOWINFO : :: c_int = 11 ;
1636- #[ cfg( not( target_env = "uclibc" ) ) ]
1637- pub const IPV6_MULTICAST_ALL : :: c_int = 29 ;
1638- #[ cfg( not( target_env = "uclibc" ) ) ]
1639- pub const IPV6_ROUTER_ALERT_ISOLATE : :: c_int = 30 ;
16401613pub const IPV6_FLOWLABEL_MGR : :: c_int = 32 ;
16411614pub const IPV6_FLOWINFO_SEND : :: c_int = 33 ;
16421615pub const IPV6_RECVFRAGSIZE : :: c_int = 77 ;
@@ -1967,8 +1940,6 @@ pub const PACKET_DROP_MEMBERSHIP: ::c_int = 2;
19671940pub const PACKET_MR_MULTICAST : :: c_int = 0 ;
19681941pub const PACKET_MR_PROMISC : :: c_int = 1 ;
19691942pub const PACKET_MR_ALLMULTI : :: c_int = 2 ;
1970- #[ cfg( not( target_env = "uclibc" ) ) ]
1971- pub const PACKET_MR_UNICAST : :: c_int = 3 ;
19721943
19731944// linux/netfilter.h
19741945pub const NF_DROP : :: c_int = 0 ;
@@ -2089,9 +2060,6 @@ pub const SIOCSRARP: ::c_ulong = 0x00008962;
20892060pub const SIOCGIFMAP : :: c_ulong = 0x00008970 ;
20902061pub const SIOCSIFMAP : :: c_ulong = 0x00008971 ;
20912062
2092- #[ cfg( not( target_env = "uclibc" ) ) ]
2093- pub const PTRACE_EVENT_STOP : :: c_int = 128 ;
2094-
20952063pub const IPTOS_TOS_MASK : u8 = 0x1E ;
20962064pub const IPTOS_PREC_MASK : u8 = 0xE0 ;
20972065
@@ -2394,10 +2362,6 @@ pub const UDP_CORK: ::c_int = 1;
23942362pub const UDP_ENCAP : :: c_int = 100 ;
23952363pub const UDP_NO_CHECK6_TX : :: c_int = 101 ;
23962364pub const UDP_NO_CHECK6_RX : :: c_int = 102 ;
2397- #[ cfg( not( target_env = "uclibc" ) ) ]
2398- pub const UDP_SEGMENT : :: c_int = 103 ;
2399- #[ cfg( not( target_env = "uclibc" ) ) ]
2400- pub const UDP_GRO : :: c_int = 104 ;
24012365
24022366// include/uapi/linux/mman.h
24032367pub const MAP_SHARED_VALIDATE : :: c_int = 0x3 ;
@@ -2816,25 +2780,73 @@ f! {
28162780 }
28172781}
28182782
2819- #[ cfg( not( target_env = "uclibc" ) ) ]
2820- extern "C" {
2821- pub fn aio_read ( aiocbp : * mut aiocb ) -> :: c_int ;
2822- pub fn aio_write ( aiocbp : * mut aiocb ) -> :: c_int ;
2823- pub fn aio_fsync ( op : :: c_int , aiocbp : * mut aiocb ) -> :: c_int ;
2824- pub fn aio_error ( aiocbp : * const aiocb ) -> :: c_int ;
2825- pub fn aio_return ( aiocbp : * mut aiocb ) -> :: ssize_t ;
2826- pub fn aio_suspend (
2827- aiocb_list : * const * const aiocb ,
2828- nitems : :: c_int ,
2829- timeout : * const :: timespec ,
2830- ) -> :: c_int ;
2831- pub fn aio_cancel ( fd : :: c_int , aiocbp : * mut aiocb ) -> :: c_int ;
2832- pub fn lio_listio (
2833- mode : :: c_int ,
2834- aiocb_list : * const * mut aiocb ,
2835- nitems : :: c_int ,
2836- sevp : * mut :: sigevent ,
2837- ) -> :: c_int ;
2783+ cfg_if ! {
2784+ if #[ cfg( not( target_env = "uclibc" ) ) ] {
2785+ extern "C" {
2786+ pub fn aio_read( aiocbp: * mut aiocb) -> :: c_int;
2787+ pub fn aio_write( aiocbp: * mut aiocb) -> :: c_int;
2788+ pub fn aio_fsync( op: :: c_int, aiocbp: * mut aiocb) -> :: c_int;
2789+ pub fn aio_error( aiocbp: * const aiocb) -> :: c_int;
2790+ pub fn aio_return( aiocbp: * mut aiocb) -> :: ssize_t;
2791+ pub fn aio_suspend(
2792+ aiocb_list: * const * const aiocb,
2793+ nitems: :: c_int,
2794+ timeout: * const :: timespec,
2795+ ) -> :: c_int;
2796+ pub fn aio_cancel( fd: :: c_int, aiocbp: * mut aiocb) -> :: c_int;
2797+ pub fn lio_listio(
2798+ mode: :: c_int,
2799+ aiocb_list: * const * mut aiocb,
2800+ nitems: :: c_int,
2801+ sevp: * mut :: sigevent,
2802+ ) -> :: c_int;
2803+ pub fn pwritev(
2804+ fd: :: c_int,
2805+ iov: * const :: iovec,
2806+ iovcnt: :: c_int,
2807+ offset: :: off_t,
2808+ ) -> :: ssize_t;
2809+ pub fn preadv(
2810+ fd: :: c_int,
2811+ iov: * const :: iovec,
2812+ iovcnt: :: c_int,
2813+ offset: :: off_t,
2814+ ) -> :: ssize_t;
2815+ pub fn getnameinfo(
2816+ sa: * const :: sockaddr,
2817+ salen: :: socklen_t,
2818+ host: * mut :: c_char,
2819+ hostlen: :: socklen_t,
2820+ serv: * mut :: c_char,
2821+ sevlen: :: socklen_t,
2822+ flags: :: c_int,
2823+ ) -> :: c_int;
2824+ pub fn getloadavg(
2825+ loadavg: * mut :: c_double,
2826+ nelem: :: c_int
2827+ ) -> :: c_int;
2828+ pub fn process_vm_readv(
2829+ pid: :: pid_t,
2830+ local_iov: * const :: iovec,
2831+ liovcnt: :: c_ulong,
2832+ remote_iov: * const :: iovec,
2833+ riovcnt: :: c_ulong,
2834+ flags: :: c_ulong,
2835+ ) -> isize ;
2836+ pub fn process_vm_writev(
2837+ pid: :: pid_t,
2838+ local_iov: * const :: iovec,
2839+ liovcnt: :: c_ulong,
2840+ remote_iov: * const :: iovec,
2841+ riovcnt: :: c_ulong,
2842+ flags: :: c_ulong,
2843+ ) -> isize ;
2844+ pub fn futimes(
2845+ fd: :: c_int,
2846+ times: * const :: timeval
2847+ ) -> :: c_int;
2848+ }
2849+ }
28382850}
28392851
28402852extern "C" {
@@ -3049,20 +3061,6 @@ extern "C" {
30493061 new_value : * const itimerspec ,
30503062 old_value : * mut itimerspec ,
30513063 ) -> :: c_int ;
3052- #[ cfg( not( target_env = "uclibc" ) ) ]
3053- pub fn pwritev (
3054- fd : :: c_int ,
3055- iov : * const :: iovec ,
3056- iovcnt : :: c_int ,
3057- offset : :: off_t ,
3058- ) -> :: ssize_t ;
3059- #[ cfg( not( target_env = "uclibc" ) ) ]
3060- pub fn preadv (
3061- fd : :: c_int ,
3062- iov : * const :: iovec ,
3063- iovcnt : :: c_int ,
3064- offset : :: off_t ,
3065- ) -> :: ssize_t ;
30663064 pub fn quotactl (
30673065 cmd : :: c_int ,
30683066 special : * const :: c_char ,
@@ -3132,43 +3130,10 @@ extern "C" {
31323130 len : * mut :: socklen_t ,
31333131 flg : :: c_int ,
31343132 ) -> :: c_int ;
3135- #[ cfg( not( target_env = "uclibc" ) ) ]
3136- pub fn getnameinfo (
3137- sa : * const :: sockaddr ,
3138- salen : :: socklen_t ,
3139- host : * mut :: c_char ,
3140- hostlen : :: socklen_t ,
3141- serv : * mut :: c_char ,
3142- sevlen : :: socklen_t ,
3143- flags : :: c_int ,
3144- ) -> :: c_int ;
31453133 pub fn pthread_setschedprio (
31463134 native : :: pthread_t ,
31473135 priority : :: c_int ,
31483136 ) -> :: c_int ;
3149- #[ cfg( not( target_env = "uclibc" ) ) ]
3150- pub fn getloadavg ( loadavg : * mut :: c_double , nelem : :: c_int ) -> :: c_int ;
3151-
3152- #[ cfg( not( target_env = "uclibc" ) ) ]
3153- pub fn process_vm_readv (
3154- pid : :: pid_t ,
3155- local_iov : * const :: iovec ,
3156- liovcnt : :: c_ulong ,
3157- remote_iov : * const :: iovec ,
3158- riovcnt : :: c_ulong ,
3159- flags : :: c_ulong ,
3160- ) -> isize ;
3161-
3162- #[ cfg( not( target_env = "uclibc" ) ) ]
3163- pub fn process_vm_writev (
3164- pid : :: pid_t ,
3165- local_iov : * const :: iovec ,
3166- liovcnt : :: c_ulong ,
3167- remote_iov : * const :: iovec ,
3168- riovcnt : :: c_ulong ,
3169- flags : :: c_ulong ,
3170- ) -> isize ;
3171-
31723137 pub fn reboot ( how_to : :: c_int ) -> :: c_int ;
31733138 pub fn setfsgid ( gid : :: gid_t ) -> :: c_int ;
31743139 pub fn setfsuid ( uid : :: uid_t ) -> :: c_int ;
@@ -3244,8 +3209,6 @@ extern "C" {
32443209 ) -> :: ssize_t ;
32453210 pub fn mkstemps ( template : * mut :: c_char , suffixlen : :: c_int ) -> :: c_int ;
32463211
3247- #[ cfg( not( target_env = "uclibc" ) ) ]
3248- pub fn futimes ( fd : :: c_int , times : * const :: timeval ) -> :: c_int ;
32493212 pub fn nl_langinfo ( item : :: nl_item ) -> * mut :: c_char ;
32503213
32513214 pub fn getdomainname ( name : * mut :: c_char , len : :: size_t ) -> :: c_int ;
0 commit comments