@@ -523,25 +523,6 @@ s! {
523
523
}
524
524
}
525
525
526
- cfg_if ! {
527
- if #[ cfg( not( target_env = "uclibc" ) ) ] {
528
- s! {
529
- pub struct Elf64_Chdr {
530
- pub ch_type: Elf64_Word ,
531
- pub ch_reserved: Elf64_Word ,
532
- pub ch_size: Elf64_Xword ,
533
- pub ch_addralign: Elf64_Xword ,
534
- }
535
-
536
- pub struct Elf32_Chdr {
537
- pub ch_type: Elf32_Word ,
538
- pub ch_size: Elf32_Word ,
539
- pub ch_addralign: Elf32_Word ,
540
- }
541
- }
542
- }
543
- }
544
-
545
526
s_no_extra_traits ! {
546
527
pub struct sockaddr_nl {
547
528
pub nl_family: :: sa_family_t,
@@ -981,13 +962,7 @@ cfg_if! {
981
962
}
982
963
}
983
964
984
- cfg_if ! {
985
- if #[ cfg( not( target_env = "uclibc" ) ) ] {
986
- pub const RUSAGE_THREAD : :: c_int = 1 ;
987
- }
988
- }
989
965
pub const RUSAGE_CHILDREN : :: c_int = -1 ;
990
-
991
966
pub const L_tmpnam : :: c_uint = 20 ;
992
967
pub const _PC_LINK_MAX: :: c_int = 0 ;
993
968
pub const _PC_MAX_CANON: :: c_int = 1 ;
@@ -1321,8 +1296,6 @@ pub const RTLD_NOW: ::c_int = 0x2;
1321
1296
pub const AT_EACCESS : :: c_int = 0x200 ;
1322
1297
1323
1298
pub const TCP_MD5SIG : :: c_int = 14 ;
1324
- #[ cfg( not( target_env = "uclibc" ) ) ]
1325
- pub const TCP_ULP : :: c_int = 31 ;
1326
1299
1327
1300
align_const ! {
1328
1301
pub const PTHREAD_MUTEX_INITIALIZER : pthread_mutex_t = pthread_mutex_t {
@@ -1384,17 +1357,13 @@ pub const MSG_INFO: ::c_int = 12;
1384
1357
1385
1358
pub const MSG_NOERROR : :: c_int = 0o10000 ;
1386
1359
pub const MSG_EXCEPT : :: c_int = 0o20000 ;
1387
- #[ cfg( not( target_env = "uclibc" ) ) ]
1388
- pub const MSG_COPY : :: c_int = 0o40000 ;
1389
1360
1390
1361
pub const SHM_R : :: c_int = 0o400 ;
1391
1362
pub const SHM_W : :: c_int = 0o200 ;
1392
1363
1393
1364
pub const SHM_RDONLY : :: c_int = 0o10000 ;
1394
1365
pub const SHM_RND : :: c_int = 0o20000 ;
1395
1366
pub const SHM_REMAP : :: c_int = 0o40000 ;
1396
- #[ cfg( not( target_env = "uclibc" ) ) ]
1397
- pub const SHM_EXEC : :: c_int = 0o100000 ;
1398
1367
1399
1368
pub const SHM_LOCK : :: c_int = 11 ;
1400
1369
pub const SHM_UNLOCK : :: c_int = 12 ;
@@ -1404,8 +1373,6 @@ pub const SHM_HUGETLB: ::c_int = 0o4000;
1404
1373
pub const SHM_NORESERVE : :: c_int = 0o10000 ;
1405
1374
1406
1375
pub const EPOLLRDHUP : :: c_int = 0x2000 ;
1407
- #[ cfg( not( target_env = "uclibc" ) ) ]
1408
- pub const EPOLLEXCLUSIVE : :: c_int = 0x10000000 ;
1409
1376
pub const EPOLLONESHOT : :: c_int = 0x40000000 ;
1410
1377
1411
1378
pub const QFMT_VFS_OLD : :: c_int = 1 ;
@@ -1467,6 +1434,16 @@ cfg_if! {
1467
1434
pub const LIO_NOP : :: c_int = 2 ;
1468
1435
pub const LIO_WAIT : :: c_int = 0 ;
1469
1436
pub const LIO_NOWAIT : :: c_int = 1 ;
1437
+ pub const RUSAGE_THREAD : :: c_int = 1 ;
1438
+ pub const TCP_ULP : :: c_int = 31 ;
1439
+ pub const MSG_COPY : :: c_int = 0o40000 ;
1440
+ pub const SHM_EXEC : :: c_int = 0o100000 ;
1441
+ pub const IPV6_MULTICAST_ALL : :: c_int = 29 ;
1442
+ pub const IPV6_ROUTER_ALERT_ISOLATE : :: c_int = 30 ;
1443
+ pub const PACKET_MR_UNICAST : :: c_int = 3 ;
1444
+ pub const PTRACE_EVENT_STOP : :: c_int = 128 ;
1445
+ pub const UDP_SEGMENT : :: c_int = 103 ;
1446
+ pub const UDP_GRO : :: c_int = 104 ;
1470
1447
}
1471
1448
}
1472
1449
@@ -1631,10 +1608,6 @@ pub const SO_ORIGINAL_DST: ::c_int = 80;
1631
1608
pub const IP_RECVFRAGSIZE : :: c_int = 25 ;
1632
1609
1633
1610
pub const IPV6_FLOWINFO : :: c_int = 11 ;
1634
- #[ cfg( not( target_env = "uclibc" ) ) ]
1635
- pub const IPV6_MULTICAST_ALL : :: c_int = 29 ;
1636
- #[ cfg( not( target_env = "uclibc" ) ) ]
1637
- pub const IPV6_ROUTER_ALERT_ISOLATE : :: c_int = 30 ;
1638
1611
pub const IPV6_FLOWLABEL_MGR : :: c_int = 32 ;
1639
1612
pub const IPV6_FLOWINFO_SEND : :: c_int = 33 ;
1640
1613
pub const IPV6_RECVFRAGSIZE : :: c_int = 77 ;
@@ -1965,8 +1938,6 @@ pub const PACKET_DROP_MEMBERSHIP: ::c_int = 2;
1965
1938
pub const PACKET_MR_MULTICAST : :: c_int = 0 ;
1966
1939
pub const PACKET_MR_PROMISC : :: c_int = 1 ;
1967
1940
pub const PACKET_MR_ALLMULTI : :: c_int = 2 ;
1968
- #[ cfg( not( target_env = "uclibc" ) ) ]
1969
- pub const PACKET_MR_UNICAST : :: c_int = 3 ;
1970
1941
1971
1942
// linux/netfilter.h
1972
1943
pub const NF_DROP : :: c_int = 0 ;
@@ -2087,9 +2058,6 @@ pub const SIOCSRARP: ::c_ulong = 0x00008962;
2087
2058
pub const SIOCGIFMAP : :: c_ulong = 0x00008970 ;
2088
2059
pub const SIOCSIFMAP : :: c_ulong = 0x00008971 ;
2089
2060
2090
- #[ cfg( not( target_env = "uclibc" ) ) ]
2091
- pub const PTRACE_EVENT_STOP : :: c_int = 128 ;
2092
-
2093
2061
pub const IPTOS_TOS_MASK : u8 = 0x1E ;
2094
2062
pub const IPTOS_PREC_MASK : u8 = 0xE0 ;
2095
2063
@@ -2392,10 +2360,6 @@ pub const UDP_CORK: ::c_int = 1;
2392
2360
pub const UDP_ENCAP : :: c_int = 100 ;
2393
2361
pub const UDP_NO_CHECK6_TX : :: c_int = 101 ;
2394
2362
pub const UDP_NO_CHECK6_RX : :: c_int = 102 ;
2395
- #[ cfg( not( target_env = "uclibc" ) ) ]
2396
- pub const UDP_SEGMENT : :: c_int = 103 ;
2397
- #[ cfg( not( target_env = "uclibc" ) ) ]
2398
- pub const UDP_GRO : :: c_int = 104 ;
2399
2363
2400
2364
// include/uapi/linux/mman.h
2401
2365
pub const MAP_SHARED_VALIDATE : :: c_int = 0x3 ;
@@ -2814,25 +2778,73 @@ f! {
2814
2778
}
2815
2779
}
2816
2780
2817
- #[ cfg( not( target_env = "uclibc" ) ) ]
2818
- extern "C" {
2819
- pub fn aio_read ( aiocbp : * mut aiocb ) -> :: c_int ;
2820
- pub fn aio_write ( aiocbp : * mut aiocb ) -> :: c_int ;
2821
- pub fn aio_fsync ( op : :: c_int , aiocbp : * mut aiocb ) -> :: c_int ;
2822
- pub fn aio_error ( aiocbp : * const aiocb ) -> :: c_int ;
2823
- pub fn aio_return ( aiocbp : * mut aiocb ) -> :: ssize_t ;
2824
- pub fn aio_suspend (
2825
- aiocb_list : * const * const aiocb ,
2826
- nitems : :: c_int ,
2827
- timeout : * const :: timespec ,
2828
- ) -> :: c_int ;
2829
- pub fn aio_cancel ( fd : :: c_int , aiocbp : * mut aiocb ) -> :: c_int ;
2830
- pub fn lio_listio (
2831
- mode : :: c_int ,
2832
- aiocb_list : * const * mut aiocb ,
2833
- nitems : :: c_int ,
2834
- sevp : * mut :: sigevent ,
2835
- ) -> :: c_int ;
2781
+ cfg_if ! {
2782
+ if #[ cfg( not( target_env = "uclibc" ) ) ] {
2783
+ extern "C" {
2784
+ pub fn aio_read( aiocbp: * mut aiocb) -> :: c_int;
2785
+ pub fn aio_write( aiocbp: * mut aiocb) -> :: c_int;
2786
+ pub fn aio_fsync( op: :: c_int, aiocbp: * mut aiocb) -> :: c_int;
2787
+ pub fn aio_error( aiocbp: * const aiocb) -> :: c_int;
2788
+ pub fn aio_return( aiocbp: * mut aiocb) -> :: ssize_t;
2789
+ pub fn aio_suspend(
2790
+ aiocb_list: * const * const aiocb,
2791
+ nitems: :: c_int,
2792
+ timeout: * const :: timespec,
2793
+ ) -> :: c_int;
2794
+ pub fn aio_cancel( fd: :: c_int, aiocbp: * mut aiocb) -> :: c_int;
2795
+ pub fn lio_listio(
2796
+ mode: :: c_int,
2797
+ aiocb_list: * const * mut aiocb,
2798
+ nitems: :: c_int,
2799
+ sevp: * mut :: sigevent,
2800
+ ) -> :: c_int;
2801
+ pub fn pwritev(
2802
+ fd: :: c_int,
2803
+ iov: * const :: iovec,
2804
+ iovcnt: :: c_int,
2805
+ offset: :: off_t,
2806
+ ) -> :: ssize_t;
2807
+ pub fn preadv(
2808
+ fd: :: c_int,
2809
+ iov: * const :: iovec,
2810
+ iovcnt: :: c_int,
2811
+ offset: :: off_t,
2812
+ ) -> :: ssize_t;
2813
+ pub fn getnameinfo(
2814
+ sa: * const :: sockaddr,
2815
+ salen: :: socklen_t,
2816
+ host: * mut :: c_char,
2817
+ hostlen: :: socklen_t,
2818
+ serv: * mut :: c_char,
2819
+ sevlen: :: socklen_t,
2820
+ flags: :: c_int,
2821
+ ) -> :: c_int;
2822
+ pub fn getloadavg(
2823
+ loadavg: * mut :: c_double,
2824
+ nelem: :: c_int
2825
+ ) -> :: c_int;
2826
+ pub fn process_vm_readv(
2827
+ pid: :: pid_t,
2828
+ local_iov: * const :: iovec,
2829
+ liovcnt: :: c_ulong,
2830
+ remote_iov: * const :: iovec,
2831
+ riovcnt: :: c_ulong,
2832
+ flags: :: c_ulong,
2833
+ ) -> isize ;
2834
+ pub fn process_vm_writev(
2835
+ pid: :: pid_t,
2836
+ local_iov: * const :: iovec,
2837
+ liovcnt: :: c_ulong,
2838
+ remote_iov: * const :: iovec,
2839
+ riovcnt: :: c_ulong,
2840
+ flags: :: c_ulong,
2841
+ ) -> isize ;
2842
+ pub fn futimes(
2843
+ fd: :: c_int,
2844
+ times: * const :: timeval
2845
+ ) -> :: c_int;
2846
+ }
2847
+ }
2836
2848
}
2837
2849
2838
2850
extern "C" {
@@ -3047,20 +3059,6 @@ extern "C" {
3047
3059
new_value : * const itimerspec ,
3048
3060
old_value : * mut itimerspec ,
3049
3061
) -> :: c_int ;
3050
- #[ cfg( not( target_env = "uclibc" ) ) ]
3051
- pub fn pwritev (
3052
- fd : :: c_int ,
3053
- iov : * const :: iovec ,
3054
- iovcnt : :: c_int ,
3055
- offset : :: off_t ,
3056
- ) -> :: ssize_t ;
3057
- #[ cfg( not( target_env = "uclibc" ) ) ]
3058
- pub fn preadv (
3059
- fd : :: c_int ,
3060
- iov : * const :: iovec ,
3061
- iovcnt : :: c_int ,
3062
- offset : :: off_t ,
3063
- ) -> :: ssize_t ;
3064
3062
pub fn quotactl (
3065
3063
cmd : :: c_int ,
3066
3064
special : * const :: c_char ,
@@ -3130,43 +3128,10 @@ extern "C" {
3130
3128
len : * mut :: socklen_t ,
3131
3129
flg : :: c_int ,
3132
3130
) -> :: c_int ;
3133
- #[ cfg( not( target_env = "uclibc" ) ) ]
3134
- pub fn getnameinfo (
3135
- sa : * const :: sockaddr ,
3136
- salen : :: socklen_t ,
3137
- host : * mut :: c_char ,
3138
- hostlen : :: socklen_t ,
3139
- serv : * mut :: c_char ,
3140
- sevlen : :: socklen_t ,
3141
- flags : :: c_int ,
3142
- ) -> :: c_int ;
3143
3131
pub fn pthread_setschedprio (
3144
3132
native : :: pthread_t ,
3145
3133
priority : :: c_int ,
3146
3134
) -> :: c_int ;
3147
- #[ cfg( not( target_env = "uclibc" ) ) ]
3148
- pub fn getloadavg ( loadavg : * mut :: c_double , nelem : :: c_int ) -> :: c_int ;
3149
-
3150
- #[ cfg( not( target_env = "uclibc" ) ) ]
3151
- pub fn process_vm_readv (
3152
- pid : :: pid_t ,
3153
- local_iov : * const :: iovec ,
3154
- liovcnt : :: c_ulong ,
3155
- remote_iov : * const :: iovec ,
3156
- riovcnt : :: c_ulong ,
3157
- flags : :: c_ulong ,
3158
- ) -> isize ;
3159
-
3160
- #[ cfg( not( target_env = "uclibc" ) ) ]
3161
- pub fn process_vm_writev (
3162
- pid : :: pid_t ,
3163
- local_iov : * const :: iovec ,
3164
- liovcnt : :: c_ulong ,
3165
- remote_iov : * const :: iovec ,
3166
- riovcnt : :: c_ulong ,
3167
- flags : :: c_ulong ,
3168
- ) -> isize ;
3169
-
3170
3135
pub fn reboot ( how_to : :: c_int ) -> :: c_int ;
3171
3136
pub fn setfsgid ( gid : :: gid_t ) -> :: c_int ;
3172
3137
pub fn setfsuid ( uid : :: uid_t ) -> :: c_int ;
@@ -3242,8 +3207,6 @@ extern "C" {
3242
3207
) -> :: ssize_t ;
3243
3208
pub fn mkstemps ( template : * mut :: c_char , suffixlen : :: c_int ) -> :: c_int ;
3244
3209
3245
- #[ cfg( not( target_env = "uclibc" ) ) ]
3246
- pub fn futimes ( fd : :: c_int , times : * const :: timeval ) -> :: c_int ;
3247
3210
pub fn nl_langinfo ( item : :: nl_item ) -> * mut :: c_char ;
3248
3211
3249
3212
pub fn getdomainname ( name : * mut :: c_char , len : :: size_t ) -> :: c_int ;
0 commit comments