main.c:8:29: error: ‘O_RDWR’ undeclared (first use in this function); did you mean ‘_IOWR’? Including <fcntl.h> solved this error.
main.c:8:29: error: ‘O_RDWR’ undeclared (first use in this function); did you mean ‘_IOWR’?
Including <fcntl.h> solved this error.