@@ -525,25 +525,6 @@ s! {
525
525
}
526
526
}
527
527
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
-
547
528
s_no_extra_traits ! {
548
529
pub struct sockaddr_nl {
549
530
pub nl_family: :: sa_family_t,
@@ -983,13 +964,7 @@ cfg_if! {
983
964
}
984
965
}
985
966
986
- cfg_if ! {
987
- if #[ cfg( not( target_env = "uclibc" ) ) ] {
988
- pub const RUSAGE_THREAD : :: c_int = 1 ;
989
- }
990
- }
991
967
pub const RUSAGE_CHILDREN : :: c_int = -1 ;
992
-
993
968
pub const L_tmpnam : :: c_uint = 20 ;
994
969
pub const _PC_LINK_MAX: :: c_int = 0 ;
995
970
pub const _PC_MAX_CANON: :: c_int = 1 ;
@@ -1323,8 +1298,6 @@ pub const RTLD_NOW: ::c_int = 0x2;
1323
1298
pub const AT_EACCESS : :: c_int = 0x200 ;
1324
1299
1325
1300
pub const TCP_MD5SIG : :: c_int = 14 ;
1326
- #[ cfg( not( target_env = "uclibc" ) ) ]
1327
- pub const TCP_ULP : :: c_int = 31 ;
1328
1301
1329
1302
align_const ! {
1330
1303
pub const PTHREAD_MUTEX_INITIALIZER : pthread_mutex_t = pthread_mutex_t {
@@ -1386,17 +1359,13 @@ pub const MSG_INFO: ::c_int = 12;
1386
1359
1387
1360
pub const MSG_NOERROR : :: c_int = 0o10000 ;
1388
1361
pub const MSG_EXCEPT : :: c_int = 0o20000 ;
1389
- #[ cfg( not( target_env = "uclibc" ) ) ]
1390
- pub const MSG_COPY : :: c_int = 0o40000 ;
1391
1362
1392
1363
pub const SHM_R : :: c_int = 0o400 ;
1393
1364
pub const SHM_W : :: c_int = 0o200 ;
1394
1365
1395
1366
pub const SHM_RDONLY : :: c_int = 0o10000 ;
1396
1367
pub const SHM_RND : :: c_int = 0o20000 ;
1397
1368
pub const SHM_REMAP : :: c_int = 0o40000 ;
1398
- #[ cfg( not( target_env = "uclibc" ) ) ]
1399
- pub const SHM_EXEC : :: c_int = 0o100000 ;
1400
1369
1401
1370
pub const SHM_LOCK : :: c_int = 11 ;
1402
1371
pub const SHM_UNLOCK : :: c_int = 12 ;
@@ -1406,8 +1375,6 @@ pub const SHM_HUGETLB: ::c_int = 0o4000;
1406
1375
pub const SHM_NORESERVE : :: c_int = 0o10000 ;
1407
1376
1408
1377
pub const EPOLLRDHUP : :: c_int = 0x2000 ;
1409
- #[ cfg( not( target_env = "uclibc" ) ) ]
1410
- pub const EPOLLEXCLUSIVE : :: c_int = 0x10000000 ;
1411
1378
pub const EPOLLONESHOT : :: c_int = 0x40000000 ;
1412
1379
1413
1380
pub const QFMT_VFS_OLD : :: c_int = 1 ;
@@ -1469,6 +1436,16 @@ cfg_if! {
1469
1436
pub const LIO_NOP : :: c_int = 2 ;
1470
1437
pub const LIO_WAIT : :: c_int = 0 ;
1471
1438
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 ;
1472
1449
}
1473
1450
}
1474
1451
@@ -1633,10 +1610,6 @@ pub const SO_ORIGINAL_DST: ::c_int = 80;
1633
1610
pub const IP_RECVFRAGSIZE : :: c_int = 25 ;
1634
1611
1635
1612
pub 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 ;
1640
1613
pub const IPV6_FLOWLABEL_MGR : :: c_int = 32 ;
1641
1614
pub const IPV6_FLOWINFO_SEND : :: c_int = 33 ;
1642
1615
pub const IPV6_RECVFRAGSIZE : :: c_int = 77 ;
@@ -1967,8 +1940,6 @@ pub const PACKET_DROP_MEMBERSHIP: ::c_int = 2;
1967
1940
pub const PACKET_MR_MULTICAST : :: c_int = 0 ;
1968
1941
pub const PACKET_MR_PROMISC : :: c_int = 1 ;
1969
1942
pub const PACKET_MR_ALLMULTI : :: c_int = 2 ;
1970
- #[ cfg( not( target_env = "uclibc" ) ) ]
1971
- pub const PACKET_MR_UNICAST : :: c_int = 3 ;
1972
1943
1973
1944
// linux/netfilter.h
1974
1945
pub const NF_DROP : :: c_int = 0 ;
@@ -2089,9 +2060,6 @@ pub const SIOCSRARP: ::c_ulong = 0x00008962;
2089
2060
pub const SIOCGIFMAP : :: c_ulong = 0x00008970 ;
2090
2061
pub const SIOCSIFMAP : :: c_ulong = 0x00008971 ;
2091
2062
2092
- #[ cfg( not( target_env = "uclibc" ) ) ]
2093
- pub const PTRACE_EVENT_STOP : :: c_int = 128 ;
2094
-
2095
2063
pub const IPTOS_TOS_MASK : u8 = 0x1E ;
2096
2064
pub const IPTOS_PREC_MASK : u8 = 0xE0 ;
2097
2065
@@ -2394,10 +2362,6 @@ pub const UDP_CORK: ::c_int = 1;
2394
2362
pub const UDP_ENCAP : :: c_int = 100 ;
2395
2363
pub const UDP_NO_CHECK6_TX : :: c_int = 101 ;
2396
2364
pub 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 ;
2401
2365
2402
2366
// include/uapi/linux/mman.h
2403
2367
pub const MAP_SHARED_VALIDATE : :: c_int = 0x3 ;
@@ -2816,25 +2780,73 @@ f! {
2816
2780
}
2817
2781
}
2818
2782
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
+ }
2838
2850
}
2839
2851
2840
2852
extern "C" {
@@ -3049,20 +3061,6 @@ extern "C" {
3049
3061
new_value : * const itimerspec ,
3050
3062
old_value : * mut itimerspec ,
3051
3063
) -> :: 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 ;
3066
3064
pub fn quotactl (
3067
3065
cmd : :: c_int ,
3068
3066
special : * const :: c_char ,
@@ -3132,43 +3130,10 @@ extern "C" {
3132
3130
len : * mut :: socklen_t ,
3133
3131
flg : :: c_int ,
3134
3132
) -> :: 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 ;
3145
3133
pub fn pthread_setschedprio (
3146
3134
native : :: pthread_t ,
3147
3135
priority : :: c_int ,
3148
3136
) -> :: 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
-
3172
3137
pub fn reboot ( how_to : :: c_int ) -> :: c_int ;
3173
3138
pub fn setfsgid ( gid : :: gid_t ) -> :: c_int ;
3174
3139
pub fn setfsuid ( uid : :: uid_t ) -> :: c_int ;
@@ -3244,8 +3209,6 @@ extern "C" {
3244
3209
) -> :: ssize_t ;
3245
3210
pub fn mkstemps ( template : * mut :: c_char , suffixlen : :: c_int ) -> :: c_int ;
3246
3211
3247
- #[ cfg( not( target_env = "uclibc" ) ) ]
3248
- pub fn futimes ( fd : :: c_int , times : * const :: timeval ) -> :: c_int ;
3249
3212
pub fn nl_langinfo ( item : :: nl_item ) -> * mut :: c_char ;
3250
3213
3251
3214
pub fn getdomainname ( name : * mut :: c_char , len : :: size_t ) -> :: c_int ;
0 commit comments