ndelay_off.c (229B)
1 /* Public domain. */ 2 3 #include <sys/types.h> 4 #include <fcntl.h> 5 #include "ndelay.h" 6 7 #ifndef O_NONBLOCK 8 #define O_NONBLOCK O_NDELAY 9 #endif 10 11 int ndelay_off(int fd) 12 { 13 return fcntl(fd,F_SETFL,fcntl(fd,F_GETFL,0) & ~O_NONBLOCK); 14 }