55use {
66 crate :: { allocs:: c_alloc:: CAlloc , traits:: AllocDescriptor } ,
77 :: core:: ffi:: c_void,
8- :: libc:: c_int
98} ;
109
1110#[ cfg( all( not( any( target_os = "horizon" , target_os = "vita" ) ) , not( windows) ) ) ]
1211#[ cfg_attr( miri, track_caller) ]
1312#[ inline( always) ]
14- pub ( crate ) unsafe fn c_alloc_spec ( align : usize , size : usize ) -> ( * mut c_void , c_int ) {
13+ pub ( crate ) unsafe fn c_alloc_spec ( align : usize , size : usize ) -> ( * mut c_void , :: libc :: c_int ) {
1514 #[ cfg( target_vendor = "apple" ) ]
1615 {
1716 if align > ( 1 << 31 ) {
@@ -27,14 +26,14 @@ pub(crate) unsafe fn c_alloc_spec(align: usize, size: usize) -> (*mut c_void, c_
2726#[ cfg( windows) ]
2827#[ cfg_attr( miri, track_caller) ]
2928#[ inline( always) ]
30- pub ( crate ) unsafe fn c_alloc_spec ( align : usize , size : usize ) -> ( * mut c_void , c_int ) {
29+ pub ( crate ) unsafe fn c_alloc_spec ( align : usize , size : usize ) -> ( * mut c_void , :: libc :: c_int ) {
3130 // SAFETY: requirements are passed onto the caller
3231 ( unsafe { _aligned_malloc ( size, align) } , 0 )
3332}
3433#[ cfg( any( target_os = "horizon" , target_os = "vita" ) ) ]
3534#[ cfg_attr( miri, track_caller) ]
3635#[ inline( always) ]
37- pub ( crate ) unsafe fn c_alloc_spec ( layout : & Layout ) -> ( * mut c_void , c_int ) {
36+ pub ( crate ) unsafe fn c_alloc_spec ( layout : & Layout ) -> ( * mut c_void , :: libc :: c_int ) {
3837 // SAFETY: requirements are passed onto the caller
3938 ( unsafe { memalign ( layout. align ( ) , layout. size ( ) ) } , 0 )
4039}
@@ -144,7 +143,7 @@ extern "C" {
144143 /// If successful, the returned pointer should be freed with [`free`].
145144 #[ must_use = "on success this function produces an allocation; dropping the returned value \
146145 will leak memory"]
147- pub fn posix_memalign ( out : * mut * mut c_void , align : usize , size : usize ) -> c_int ;
146+ pub fn posix_memalign ( out : * mut * mut c_void , align : usize , size : usize ) -> :: libc :: c_int ;
148147
149148 #[ cfg( all( not( windows) , any( target_os = "horizon" , target_os = "vita" ) ) ) ]
150149 /// Allocates `size` bytes aligned to `align`.
0 commit comments