From 37ea4e513a2ce0cd22f9c9a32b18d5c022e38e12 Mon Sep 17 00:00:00 2001 From: Andrew Cooper Date: Tue, 31 May 2022 17:37:10 +0100 Subject: [PATCH] build: Fix build with GCC 4.8.5 GCC 4.8.5 complains: xtf/arch/x86/pv/traps.c: In function 'init_callbacks': xtf/arch/x86/pv/traps.c:126:13: error: initializer element is not constant .address = INIT_XEN_CALLBACK(__KERN_CS, _u(entry_EVTCHN)), ^ xtf/arch/x86/pv/traps.c:126:13: error: (near initialization for 'cb[0].address') Drop the static const. Reported-by: Samuel Verschelde Signed-off-by: Andrew Cooper --- arch/x86/pv/traps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/pv/traps.c b/arch/x86/pv/traps.c index ae506d1..e78f97e 100644 --- a/arch/x86/pv/traps.c +++ b/arch/x86/pv/traps.c @@ -120,7 +120,7 @@ static void init_callbacks(void) if ( rc ) panic("Failed to set trap table: %d\n", rc); - static const xen_callback_register_t cb[] = { + xen_callback_register_t cb[] = { { .type = CALLBACKTYPE_event, .address = INIT_XEN_CALLBACK(__KERN_CS, _u(entry_EVTCHN)), -- 2.39.5