Include <sys/ioctl.h>, <sys/resource.h> and <sys/wait.h> optionally.
authorEd Schouten <ed@nuxi.nl>
Wed, 26 Aug 2015 08:06:09 +0000 (10:06 +0200)
committerAzat Khuzhin <a3at.mail@gmail.com>
Thu, 10 Sep 2015 09:14:27 +0000 (12:14 +0300)
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.

event_tagging.c
http.c

index 64b100b82510aca72901afae7b78e6f0a61f239f..6459dfa72e5b5c56b5c2c13ed50a042ddf00ae3a 100644 (file)
 #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>
diff --git a/http.c b/http.c
index 99308b39fd0b314a655b32456b858a1d268ad800..75b902dc5d6e0660bcfea64951b6949a8b11d2b3 100644 (file)
--- a/http.c
+++ b/http.c
 #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>