I get following error, however, fd_set is defined in /usr/include/sys/select.h
root@benjamin-Lenovo-IdeaPad-Y510P:~/bin/setwidth/src# icc -std=c99 -I /usr/include -I /usr/local/lib/R/include/ -O3 -ipo -xavx -openmp -c setwidth.c
In file included from setwidth.c(4):
/usr/local/lib/R/include/R_ext/eventloop.h(73): error: identifier "fd_set" is undefined
extern InputHandler *getSelectedHandler(InputHandler *handlers, fd_set *mask);
^
In file included from setwidth.c(4):
/usr/local/lib/R/include/R_ext/eventloop.h(74): error: identifier "fd_set" is undefined
extern fd_set *R_checkActivity(int usec, int ignore_stdin);
^
In file included from setwidth.c(4):
/usr/local/lib/R/include/R_ext/eventloop.h(75): error: identifier "fd_set" is undefined
extern fd_set *R_checkActivityEx(int usec, int ignore_stdin, void (*intr)(void));
^
In file included from setwidth.c(4):
/usr/local/lib/R/include/R_ext/eventloop.h(76): error: identifier "fd_set" is undefined
extern void R_runHandlers(InputHandler *handlers, fd_set *mask);
^
In file included from setwidth.c(4):
/usr/local/lib/R/include/R_ext/eventloop.h(78): error: identifier "fd_set" is undefined
extern int R_SelectEx(int n, fd_set *readfds, fd_set *writefds,
^
In file included from setwidth.c(4):
/usr/local/lib/R/include/R_ext/eventloop.h(78): error: identifier "fd_set" is undefined
extern int R_SelectEx(int n, fd_set *readfds, fd_set *writefds,
^
In file included from setwidth.c(4):
/usr/local/lib/R/include/R_ext/eventloop.h(79): error: identifier "fd_set" is undefined
fd_set *exceptfds, struct timeval *timeout,
^
In file included from setwidth.c(4):
/usr/local/lib/R/include/R_ext/eventloop.h(79): warning #274: declaration is not visible outside of function
fd_set *exceptfds, struct timeval *timeout,
^
setwidth.c(78): warning #167: argument of type "void (*)()" is incompatible with parameter of type "void (*)(void *)"
R_ToplevelExec(setwidth_Set, NULL);
^
compilation aborted for setwidth.c (code 2)