rustit/mirror_runit/runit-2.1.2/src/ndelay_off.c
2024-03-24 23:51:57 +00:00

14 lines
229 B
C

/* Public domain. */
#include <sys/types.h>
#include <fcntl.h>
#include "ndelay.h"
#ifndef O_NONBLOCK
#define O_NONBLOCK O_NDELAY
#endif
int ndelay_off(int fd)
{
return fcntl(fd,F_SETFL,fcntl(fd,F_GETFL,0) & ~O_NONBLOCK);
}