Though CloudABI implements a very large part of POSIX, it does not
provide these header files, for the reason that there is no raw device
access, no resource limiting and no access to the global process table
through wait().
It looks like these header files are not actually needed in theory.
There don't seem to be any constructs in these source files that use
these features, but I suspect they might still be required on some
systems.
#include <winsock2.h>
#include <windows.h>
#undef WIN32_LEAN_AND_MEAN
-#else
-#include <sys/ioctl.h>
#endif
+#ifdef EVENT__HAVE_SYS_IOCTL_H
+#include <sys/ioctl.h>
+#endif
#include <sys/queue.h>
#ifdef EVENT__HAVE_SYS_TIME_H
#include <sys/time.h>
#include <sys/types.h>
#endif
+#ifdef HAVE_SYS_IOCCOM_H
+#include <sys/ioccom.h>
+#endif
+#ifdef EVENT__HAVE_SYS_RESOURCE_H
+#include <sys/resource.h>
+#endif
#ifdef EVENT__HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
-#ifdef HAVE_SYS_IOCCOM_H
-#include <sys/ioccom.h>
+#ifdef EVENT__HAVE_SYS_WAIT_H
+#include <sys/wait.h>
#endif
#ifndef _WIN32
-#include <sys/resource.h>
#include <sys/socket.h>
#include <sys/stat.h>
-#include <sys/wait.h>
#else
#include <winsock2.h>
#include <ws2tcpip.h>