# grep -R "FIONREAD" /usr/include
/usr/include/linux/sockios.h:#define SIOCINQ FIONREAD
/usr/include/asm-generic/ioctls.h:#define FIONREAD 0x541B
# grep -R "ioctls.h" /usr/include
grep: /usr/include/postproc/postprocess.h: No such file or directory
/usr/include/bits/ioctls.h:# error "Never use <bits/ioctls.h> directly; include <sys/ioctl.h> instead."
/usr/include/bits/ioctls.h:#include <asm/ioctls.h>
/usr/include/bits/ioctl-types.h:#include <asm/ioctls.h>
/usr/include/asm/ioctls.h:#include <asm-generic/ioctls.h>
/usr/include/asm/mce.h:#include <asm/ioctls.h>
/usr/include/sys/ioctl.h:#include <bits/ioctls.h>
/usr/include/sys/ioctl.h: values). The code to generate <bits/ioctls.h> has omitted these
/usr/include/asm-generic/termios.h:#include <asm/ioctls.h>
Т.е. для тебя нужно #include <sys/ioctl.h>
Кстати NetBeans это не компилятор. А IDE. Компилятор скорее всего gcc.