chiark / gitweb /
Upstream qmail 1.03
[qmail] / ndelay.c
index 207e7f261823021613fae87b2f73baa31c46efcf..438d1d8534b94d25043eb95f6f3fdf32499fce46 100644 (file)
--- a/ndelay.c
+++ b/ndelay.c
@@ -2,8 +2,12 @@
 #include <fcntl.h>
 #include "ndelay.h"
 
+#ifndef O_NONBLOCK
+#define O_NONBLOCK O_NDELAY
+#endif
+
 int ndelay_on(fd)
 int fd;
 {
-  return fcntl(fd,F_SETFL,fcntl(fd,F_GETFL,0) | O_NDELAY);
+  return fcntl(fd,F_SETFL,fcntl(fd,F_GETFL,0) | O_NONBLOCK);
 }