#include <sys/stat.h>
+#ifdef HAVE_SYS_IOCTL_H
+#include <sys/ioctl.h>
+#endif
+
+#ifdef HAVE_SYS_FILIO_H
+#include <sys/filio.h>
+#endif
+
#include <signal.h>
#ifdef HAVE_SYS_WAIT_H
#include <sys/wait.h>
#endif
#define SIGNAL_CAST (RETSIGTYPE (*)())
+
+#ifndef EWOULDBLOCK
+#define EWOULDBLOCK EAGAIN
+#endif