1 --- xen-4.14.1/tools/ocaml/libs/xentoollog/xentoollog_stubs.c.orig 2020-12-17 16:47:25.000000000 +0000
2 +++ xen-4.14.1/tools/ocaml/libs/xentoollog/xentoollog_stubs.c 2021-03-01 22:53:23.106205483 +0000
4 #include "_xtl_levels.inc"
6 /* Option type support as per http://www.linux-nantes.org/~fmonnier/ocaml/ocaml-wrapping-c.php */
7 -#define Val_none Val_int(0)
8 -#define Some_val(v) Field(v,0)
10 static value Val_some(value v)
12 --- xen-4.14.1/tools/ocaml/libs/xl/xenlight_stubs.c.orig 2020-12-17 16:47:25.000000000 +0000
13 +++ xen-4.14.1/tools/ocaml/libs/xl/xenlight_stubs.c 2021-03-01 23:01:24.229859714 +0000
17 /* Option type support as per http://www.linux-nantes.org/~fmonnier/ocaml/ocaml-wrapping-c.php */
18 -#define Val_none Val_int(0)
19 -#define Some_val(v) Field(v,0)
21 static value Val_some(value v)
23 --- xen-4.14.1/tools/ocaml/libs/xc/xenctrl_stubs.c.orig 2020-12-17 16:47:25.000000000 +0000
24 +++ xen-4.14.1/tools/ocaml/libs/xc/xenctrl_stubs.c 2021-03-01 23:24:45.477290290 +0000
26 #define _H(__h) ((xc_interface *)(__h))
27 #define _D(__d) ((uint32_t)Int_val(__d))
29 -#define Val_none (Val_int(0))
31 #define string_of_option_array(array, index) \
32 ((Field(array, index) == Val_none) ? NULL : String_val(Field(Field(array, index), 0)))
34 --- xen-4.13.1/tools/ocaml/common.make~ 2020-05-14 14:19:32.000000000 +0200
35 +++ xen-4.13.1/tools/ocaml/common.make 2021-03-26 11:08:01.558827358 +0100
37 OCAMLYACC ?= ocamlyacc
38 OCAMLFIND ?= ocamlfind
40 -CFLAGS += -fPIC -Werror -I$(shell ocamlc -where)
41 +CFLAGS += -fPIC -I$(shell ocamlc -where)
43 OCAMLOPTFLAG_G := $(shell $(OCAMLOPT) -h 2>&1 | sed -n 's/^ *\(-g\) .*/\1/p')
44 OCAMLOPTFLAGS = $(OCAMLOPTFLAG_G) -ccopt "$(LDFLAGS)" -dtypes $(OCAMLINCLUDE) -cc $(CC) -w F -warn-error F