From d4ccedc50d7b74a2044784179496287a4c38c5cb Mon Sep 17 00:00:00 2001 From: Mindy Preston Date: Wed, 30 Nov 2016 15:03:35 -0600 Subject: [PATCH] for compiler version 4.04, set OCAML_OS_TYPE to "xen" --- xen-ocaml/build.sh | 1 + xen-ocaml/os-type-xen.patch | 10 ++++++++++ 2 files changed, 11 insertions(+) create mode 100644 xen-ocaml/os-type-xen.patch diff --git a/xen-ocaml/build.sh b/xen-ocaml/build.sh index 7a0adc6..a733275 100755 --- a/xen-ocaml/build.sh +++ b/xen-ocaml/build.sh @@ -55,6 +55,7 @@ case `ocamlopt -version` in echo Applying OCaml 4.04 config cp config/version-404.h ocaml-src/byterun/caml/version.h patch < clambda-warnings.patch -p 0 + patch < os-type-xen.patch -p 0 esac cp config/s.h ocaml-src/config/ diff --git a/xen-ocaml/os-type-xen.patch b/xen-ocaml/os-type-xen.patch new file mode 100644 index 0000000..122f164 --- /dev/null +++ b/xen-ocaml/os-type-xen.patch @@ -0,0 +1,10 @@ +define OCAML_OS_TYPE as "xen". Only a good idea for compiler versions >= 4.04.0. +See https://github.com/mirage/mirage-platform/pull/78/ . +--- config/s.h ++++ config/s.h +@@ -1,4 +1,4 @@ +-#define OCAML_OS_TYPE "Unix" ++#define OCAML_OS_TYPE "xen" + #define OCAML_STDLIB_DIR "/usr/local/lib/ocaml" + #define POSIX_SIGNALS + //#define HAS_GETRUSAGE