|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v3 5/5] tools/ocaml: Fix redefinition errors
Hi Costin, On 10/05/2021 09:35, Costin Lupu wrote: If PAGE_SIZE is already defined in the system (e.g. in /usr/include/limits.h header) then gcc will trigger a redefinition error because of -Werror. This patch replaces usage of PAGE_* macros with XC_PAGE_* macros in order to avoid confusion between control domain page granularity (PAGE_* definitions) and guest domain page granularity (which is what we are dealing with here). Same issue applies for redefinitions of Val_none and Some_val macros which can be already define in the OCaml system headers (e.g. /usr/lib/ocaml/caml/mlvalues.h). Signed-off-by: Costin Lupu <costin.lupu@xxxxxxxxx> Reviewed-by: Julien Grall <jgrall@xxxxxxxxxx> Cheers, --- tools/ocaml/libs/xc/xenctrl_stubs.c | 10 ++++------ tools/ocaml/libs/xentoollog/xentoollog_stubs.c | 4 ++++ tools/ocaml/libs/xl/xenlight_stubs.c | 4 ++++ 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/tools/ocaml/libs/xc/xenctrl_stubs.c b/tools/ocaml/libs/xc/xenctrl_stubs.c index d05d7bb30e..f9e33e599a 100644 --- a/tools/ocaml/libs/xc/xenctrl_stubs.c +++ b/tools/ocaml/libs/xc/xenctrl_stubs.c @@ -36,14 +36,12 @@#include "mmap_stubs.h" -#define PAGE_SHIFT 12-#define PAGE_SIZE (1UL << PAGE_SHIFT) -#define PAGE_MASK (~(PAGE_SIZE-1)) - #define _H(__h) ((xc_interface *)(__h)) #define _D(__d) ((uint32_t)Int_val(__d))+#ifndef Val_none#define Val_none (Val_int(0)) +#endif#define string_of_option_array(array, index) \ -- Julien Grall
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |