11//! libc syscalls supporting `rustix::event`.
22
33use crate :: backend:: c;
4+ #[ cfg( any( linux_kernel, solarish, target_os = "redox" ) ) ]
5+ use crate :: backend:: conv:: ret;
6+ use crate :: backend:: conv:: ret_c_int;
7+ #[ cfg( feature = "alloc" ) ]
48#[ cfg( any( linux_kernel, target_os = "redox" ) ) ]
59use crate :: backend:: conv:: ret_u32;
6- use crate :: backend:: conv:: { borrowed_fd, ret, ret_c_int, ret_owned_fd} ;
710#[ cfg( solarish) ]
811use crate :: event:: port:: Event ;
912#[ cfg( any(
@@ -14,14 +17,36 @@ use crate::event::port::Event;
1417) ) ]
1518use crate :: event:: EventfdFlags ;
1619use crate :: event:: PollFd ;
17- use crate :: fd:: { BorrowedFd , OwnedFd } ;
1820use crate :: io;
1921#[ cfg( solarish) ]
2022use crate :: utils:: as_mut_ptr;
2123#[ cfg( any( linux_kernel, target_os = "redox" ) ) ]
2224use crate :: utils:: as_ptr;
25+ #[ cfg( any(
26+ all( feature = "alloc" , bsd) ,
27+ solarish,
28+ all( feature = "alloc" , any( linux_kernel, target_os = "redox" ) ) ,
29+ ) ) ]
2330use core:: mem:: MaybeUninit ;
31+ #[ cfg( any( linux_kernel, solarish, target_os = "redox" ) ) ]
2432use core:: ptr:: null_mut;
33+ #[ cfg( any(
34+ linux_kernel,
35+ solarish,
36+ target_os = "redox" ,
37+ all( feature = "alloc" , bsd)
38+ ) ) ]
39+ use { crate :: backend:: conv:: borrowed_fd, crate :: fd:: BorrowedFd } ;
40+ #[ cfg( any(
41+ linux_kernel,
42+ solarish,
43+ target_os = "freebsd" ,
44+ target_os = "illumos" ,
45+ target_os = "espidf" ,
46+ target_os = "redox" ,
47+ all( feature = "alloc" , bsd)
48+ ) ) ]
49+ use { crate :: backend:: conv:: ret_owned_fd, crate :: fd:: OwnedFd } ;
2550#[ cfg( all( feature = "alloc" , bsd) ) ]
2651use { crate :: event:: kqueue:: Event , crate :: utils:: as_ptr, core:: ptr:: null} ;
2752
@@ -249,6 +274,7 @@ pub(crate) fn epoll_del(epoll: BorrowedFd<'_>, source: BorrowedFd<'_>) -> io::Re
249274}
250275
251276#[ inline]
277+ #[ cfg( feature = "alloc" ) ]
252278#[ cfg( any( linux_kernel, target_os = "redox" ) ) ]
253279pub ( crate ) fn epoll_wait (
254280 epoll : BorrowedFd < ' _ > ,
0 commit comments