From 70e06765af4614330205628cde0a49e30535f303 Mon Sep 17 00:00:00 2001 From: Adrian Reber Date: Wed, 13 Mar 2019 12:48:19 +0000 Subject: [PATCH] criu: fix gcc9 rawhide compilation errors Signed-off-by: Adrian Reber --- compel/arch/x86/src/lib/include/uapi/asm/fpu.h | 12 +++++++----- compel/arch/x86/src/lib/include/uapi/asm/sigframe.h | 2 +- criu/arch/x86/include/asm/restore.h | 2 +- criu/sk-unix.c | 4 ++-- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/compel/arch/x86/src/lib/include/uapi/asm/fpu.h b/compel/arch/x86/src/lib/include/uapi/asm/fpu.h index a32a00e9c8..896c3f253b 100644 --- a/compel/arch/x86/src/lib/include/uapi/asm/fpu.h +++ b/compel/arch/x86/src/lib/include/uapi/asm/fpu.h @@ -12,7 +12,9 @@ #define FP_XSTATE_MAGIC1 0x46505853U #define FP_XSTATE_MAGIC2 0x46505845U +#ifndef FP_XSTATE_MAGIC2_SIZE #define FP_XSTATE_MAGIC2_SIZE sizeof(FP_XSTATE_MAGIC2) +#endif #define XSTATE_FP 0x1 #define XSTATE_SSE 0x2 @@ -261,7 +263,7 @@ struct xsave_struct_ia32 { struct ymmh_struct ymmh; uint8_t extended_state_area[EXTENDED_STATE_AREA_SIZE]; }; -} __aligned(FXSAVE_ALIGN_BYTES) __packed; +} __aligned(FXSAVE_ALIGN_BYTES); typedef struct { /* @@ -286,7 +288,7 @@ struct user_i387_ia32_struct { uint32_t foo; /* FPU Operand Pointer Offset */ uint32_t fos; /* FPU Operand Pointer Selector */ uint32_t st_space[20]; /* 8*10 bytes for each FP-reg = 80 bytes */ -} __packed; +}; typedef struct { struct { @@ -294,12 +296,12 @@ typedef struct { /* Software status information [not touched by FSAVE]: */ uint32_t status; - } __packed fregs_state; + } fregs_state; union { struct xsave_struct_ia32 xsave; uint8_t __pad[sizeof(struct xsave_struct) + FP_XSTATE_MAGIC2_SIZE]; - } __aligned(FXSAVE_ALIGN_BYTES) __packed; -} __aligned(FXSAVE_ALIGN_BYTES) __packed fpu_state_ia32_t; + } __aligned(FXSAVE_ALIGN_BYTES); +} __aligned(FXSAVE_ALIGN_BYTES) fpu_state_ia32_t; /* * This one is used in restorer. diff --git a/compel/arch/x86/src/lib/include/uapi/asm/sigframe.h b/compel/arch/x86/src/lib/include/uapi/asm/sigframe.h index c29de3bd58..768fb61ab7 100644 --- a/compel/arch/x86/src/lib/include/uapi/asm/sigframe.h +++ b/compel/arch/x86/src/lib/include/uapi/asm/sigframe.h @@ -95,7 +95,7 @@ struct ucontext_ia32 { compat_stack_t uc_stack; struct rt_sigcontext_32 uc_mcontext; k_rtsigset_t uc_sigmask; /* mask last for extensibility */ -} __packed; +}; struct rt_sigframe_ia32 { uint32_t pretcode; diff --git a/criu/arch/x86/include/asm/restore.h b/criu/arch/x86/include/asm/restore.h index a3e7af92f7..21787a7c83 100644 --- a/criu/arch/x86/include/asm/restore.h +++ b/criu/arch/x86/include/asm/restore.h @@ -17,7 +17,7 @@ : "g"(new_sp), \ "g"(restore_task_exec_start), \ "g"(task_args) \ - : "rsp", "rdi", "rsi", "rbx", "rax", "memory") + : "rdi", "rsi", "rbx", "rax", "memory") static inline void core_get_tls(CoreEntry *pcore, tls_t *ptls) { diff --git a/criu/sk-unix.c b/criu/sk-unix.c index 90124ed07a..26123515c7 100644 --- a/criu/sk-unix.c +++ b/criu/sk-unix.c @@ -437,8 +437,8 @@ static int dump_one_unix_fd(int lfd, uint32_t id, const struct fd_parms *p) */ if (peer->peer_ino != ue->ino) { if (!peer->name) { - pr_err("Unix socket %d with unreachable peer %d (%d/%s)\n", - ue->ino, ue->peer, peer->peer_ino, peer->name); + pr_err("Unix socket %d with unreachable peer %d (%d)\n", + ue->ino, ue->peer, peer->peer_ino); goto err; } }