rustit/mirror_runit/runit-2.1.2/src/ndelay_off.c

15 lines
229 B
C
Raw Normal View History

2024-03-25 00:51:57 +01:00
/* 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);
}