File tree Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -14,17 +14,9 @@ use libc as sys;
14
14
15
15
use crate :: { syscall, syscall_los, syscall_los_eagain} ;
16
16
17
- // For ESP-IDF sys::FDSETSIZE is currently wrongly set to 1024 in the `libc` crate
18
- // Therefore, use a custom value for now
19
- #[ cfg( target_os = "espidf" ) ]
20
- const MAX_FDS : usize = 64 ;
21
-
22
- #[ cfg( not( target_os = "espidf" ) ) ]
23
- const MAX_FDS : usize = sys:: FD_SETSIZE ;
24
-
25
17
// In future, we might want to use a smaller - and possibly - configurable - with cargo feature(s)
26
18
// amount of registrations to save memory, but for now, let's use the maximum amount
27
- const MAX_REGISTRATIONS : usize = MAX_FDS ;
19
+ const MAX_REGISTRATIONS : usize = sys :: FD_SETSIZE ;
28
20
29
21
#[ derive( EnumSetType , Debug ) ]
30
22
pub ( crate ) enum Event {
@@ -114,7 +106,7 @@ impl<const N: usize> Registrations<N> {
114
106
Err ( ErrorKind :: InvalidInput ) ?;
115
107
}
116
108
117
- if fd >= MAX_FDS as RawFd {
109
+ if fd >= sys :: FD_SETSIZE as RawFd {
118
110
Err ( ErrorKind :: InvalidInput ) ?;
119
111
}
120
112
You can’t perform that action at this time.
0 commit comments