nuttx icon indicating copy to clipboard operation
nuttx copied to clipboard

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

Open PwnVerse opened this issue 1 year ago • 2 comments

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.

PwnVerse avatar Nov 09 '23 16:11 PwnVerse

could you provide a patch to fix.

xiaoxiang781216 avatar Nov 09 '23 16:11 xiaoxiang781216

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

acassis avatar Nov 09 '23 22:11 acassis