From 68883006e0a357e4132da1c10c26207747aca615 Mon Sep 17 00:00:00 2001 From: Hannes Mehnert Date: Sun, 28 Jul 2019 20:42:46 +0200 Subject: [PATCH 1/2] configure: fix 4.08+ case --- configure.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.sh b/configure.sh index ceb1a7d..74efafd 100755 --- a/configure.sh +++ b/configure.sh @@ -64,7 +64,7 @@ case $(ocamlopt -version) in echo '#define INT64_LITERAL(s) s ## LL' >> config/m.${BUILD_ARCH}.h echo 'SYSTEM=freestanding' >> config/Makefile.${BUILD_OS}.${BUILD_ARCH} ;; - 4.08.[0-9]|4.07.[0-9]+*) + 4.08.[0-9]|4.08.[0-9]+*) OCAML_GTE_4_06_0=yes OCAML_GTE_4_07_0=yes OCAML_GTE_4_08_0=yes From 7857bfba3a0692761f7d3fb3a50bf77fb507486f Mon Sep 17 00:00:00 2001 From: Hannes Mehnert Date: Sat, 3 Aug 2019 13:29:04 +0200 Subject: [PATCH 2/2] nolibc: move types pid_t, off_t, ssize_t to sys/types.h (as specified by posix) since ocaml/ocaml#8843 (>= 4.08.1+rc3) off_t in sys/types.h is required --- nolibc/include/sys/types.h | 4 ++++ nolibc/include/unistd.h | 5 ++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/nolibc/include/sys/types.h b/nolibc/include/sys/types.h index 20e7053..50f4a48 100644 --- a/nolibc/include/sys/types.h +++ b/nolibc/include/sys/types.h @@ -4,4 +4,8 @@ #include #include +typedef int pid_t; +typedef int off_t; +typedef int ssize_t; + #endif diff --git a/nolibc/include/unistd.h b/nolibc/include/unistd.h index e59e7a3..fdfa5b3 100644 --- a/nolibc/include/unistd.h +++ b/nolibc/include/unistd.h @@ -1,16 +1,15 @@ #ifndef _UNISTD_H #define _UNISTD_H +#include + int chdir(const char *); int close(int); char *getcwd(char *, size_t); -typedef int pid_t; pid_t getpid(void); pid_t getppid(void); int isatty(int); -typedef int off_t; off_t lseek(int, off_t, int); /* SEEK_ */ -typedef int ssize_t; ssize_t read(int, void *, size_t); ssize_t write(int, const void *, size_t); ssize_t readlink(const char *, char *, size_t);