~ chicken-core (chicken-5) c04154ee38eca82d8489ae0579c9fede1c040f9c
commit c04154ee38eca82d8489ae0579c9fede1c040f9c
Author: Peter Bex <peter@more-magic.net>
AuthorDate: Sun Jan 7 20:46:47 2018 +0100
Commit: Peter Bex <peter@more-magic.net>
CommitDate: Sun Jan 7 20:46:47 2018 +0100
Fix build on Cygwin by importing <fcntl.h>, needed for O_RDONLY
Including it only on __linux__ and C_XXXBSD is one of the weirdest
conditions, and will indeed hide bugs like this on Cygwin and other
less mainstream platforms.
diff --git a/runtime.c b/runtime.c
index ab411903..275377cf 100644
--- a/runtime.c
+++ b/runtime.c
@@ -41,10 +41,6 @@
# include <android/log.h>
#endif
-#if defined(C_XXXBSD) || defined(__linux__)
-#include <fcntl.h>
-#endif
-
#if !defined(PIC)
# define NO_DLOAD2
#endif
@@ -77,6 +73,7 @@
# include <sys/time.h>
# include <sys/resource.h>
# include <sys/wait.h>
+# include <fcntl.h>
/* ITIMER_PROF is more precise, but Cygwin doesn't support it... */
# ifdef __CYGWIN__
Trap