@@ -302,9 +302,18 @@ s! {
302
302
#[ cfg( target_pointer_width = "32" ) ]
303
303
pub dlpi_phnum: Elf32_Half ,
304
304
305
+ // As of uClibc 1.0.36, the following fields are
306
+ // gated behind a "#if 0" block which always evaluates
307
+ // to false. So I'm just removing these, and if uClibc changes
308
+ // the #if block in the future to include the following fields, these
309
+ // will probably need including here. tsidea, skrap
310
+ #[ cfg( not( target_env = "uclibc" ) ) ]
305
311
pub dlpi_adds: :: c_ulonglong,
312
+ #[ cfg( not( target_env = "uclibc" ) ) ]
306
313
pub dlpi_subs: :: c_ulonglong,
314
+ #[ cfg( not( target_env = "uclibc" ) ) ]
307
315
pub dlpi_tls_modid: :: size_t,
316
+ #[ cfg( not( target_env = "uclibc" ) ) ]
308
317
pub dlpi_tls_data: * mut :: c_void,
309
318
}
310
319
@@ -2792,20 +2801,8 @@ f! {
2792
2801
}
2793
2802
}
2794
2803
2804
+ #[ cfg( not( target_env = "uclibc" ) ) ]
2795
2805
extern "C" {
2796
- #[ cfg_attr( not( target_env = "musl" ) , link_name = "__xpg_strerror_r" ) ]
2797
- pub fn strerror_r (
2798
- errnum : :: c_int ,
2799
- buf : * mut c_char ,
2800
- buflen : :: size_t ,
2801
- ) -> :: c_int ;
2802
-
2803
- pub fn abs ( i : :: c_int ) -> :: c_int ;
2804
- pub fn atof ( s : * const :: c_char ) -> :: c_double ;
2805
- pub fn labs ( i : :: c_long ) -> :: c_long ;
2806
- pub fn rand ( ) -> :: c_int ;
2807
- pub fn srand ( seed : :: c_uint ) ;
2808
-
2809
2806
pub fn aio_read ( aiocbp : * mut aiocb ) -> :: c_int ;
2810
2807
pub fn aio_write ( aiocbp : * mut aiocb ) -> :: c_int ;
2811
2808
pub fn aio_fsync ( op : :: c_int , aiocbp : * mut aiocb ) -> :: c_int ;
@@ -2823,6 +2820,22 @@ extern "C" {
2823
2820
nitems : :: c_int ,
2824
2821
sevp : * mut :: sigevent ,
2825
2822
) -> :: c_int ;
2823
+ }
2824
+
2825
+
2826
+ extern "C" {
2827
+ #[ cfg_attr( not( target_env = "musl" ) , link_name = "__xpg_strerror_r" ) ]
2828
+ pub fn strerror_r (
2829
+ errnum : :: c_int ,
2830
+ buf : * mut c_char ,
2831
+ buflen : :: size_t ,
2832
+ ) -> :: c_int ;
2833
+
2834
+ pub fn abs ( i : :: c_int ) -> :: c_int ;
2835
+ pub fn atof ( s : * const :: c_char ) -> :: c_double ;
2836
+ pub fn labs ( i : :: c_long ) -> :: c_long ;
2837
+ pub fn rand ( ) -> :: c_int ;
2838
+ pub fn srand ( seed : :: c_uint ) ;
2826
2839
2827
2840
pub fn lutimes ( file : * const :: c_char , times : * const :: timeval ) -> :: c_int ;
2828
2841
@@ -3594,7 +3607,10 @@ extern "C" {
3594
3607
}
3595
3608
3596
3609
cfg_if ! {
3597
- if #[ cfg( target_env = "musl" ) ] {
3610
+ if #[ cfg( target_env = "uclibc" ) ] {
3611
+ mod uclibc;
3612
+ pub use self :: uclibc:: * ;
3613
+ } else if #[ cfg( target_env = "musl" ) ] {
3598
3614
mod musl;
3599
3615
pub use self :: musl:: * ;
3600
3616
} else if #[ cfg( target_env = "gnu" ) ] {
0 commit comments