apache / nuttx

Apache NuttX is a mature, real-time embedded operating system (RTOS)
https://nuttx.apache.org/
Apache License 2.0
2.82k stars 1.17k forks source link

Failure in compilation of sim_hostusrsock.c due to improper handling of header inclusion for fd_set #11159

Open PwnVerse opened 12 months ago

PwnVerse commented 12 months ago

Compilation failure may result due to missing header which defines the fd_set structure in sim_hostusrsock.c.

/home/ritvik/Desktop/Files/Fuzzing_RTOS_Applications/Ported_Applications/nuttxspace/nuttx/arch/sim/src/sim/posix/sim_hostusrsock.c:51:8: error: unknown type name 'fd_set'
   51 | static fd_set g_active_read_fds;
      |        ^
/home/ritvik/Desktop/Files/Fuzzing_RTOS_Applications/Ported_Applications/nuttxspace/nuttx/arch/sim/src/sim/posix/sim_hostusrsock.c:52:8: error: unknown type name 'fd_set'
   52 | static fd_set g_active_write_fds;

fd_set is only defined in select.h which should be included in this header or any of the subsequent headers included in this file.

xiaoxiang781216 commented 12 months ago

could you provide a patch to fix.

acassis commented 12 months ago

@PwnVerse very nice! I hope you help to find issue on NuttX fuzzing it! ;-)