Blame SOURCES/0016-pc-bios-s390-ccw-struct-tpi_info-must-be-declared-as.patch

26ba25
From 3e38e82fc6601763cb597d8849a61a871ab06b72 Mon Sep 17 00:00:00 2001
26ba25
From: Thomas Huth <thuth@redhat.com>
26ba25
Date: Tue, 8 May 2018 12:01:10 +0200
26ba25
Subject: pc-bios/s390-ccw: struct tpi_info must be declared as aligned(4)
26ba25
26ba25
Upstream-status: n/a yet (likely later, but downstream fix is required now)
26ba25
26ba25
I've run into a compilation error today with the current version of GCC:
26ba25
26ba25
In file included from s390-ccw.h:49,
26ba25
                 from main.c:12:
26ba25
cio.h:128:1: error: alignment 1 of 'struct tpi_info' is less than 4 [-Werror=packed-not-aligned]
26ba25
 } __attribute__ ((packed));
26ba25
 ^
26ba25
cc1: all warnings being treated as errors
26ba25
26ba25
Since the struct tpi_info contains an element ("struct subchannel_id schid")
26ba25
which is marked as aligned(4), we've got to mark the struct tpi_info as
26ba25
aligned(4), too.
26ba25
26ba25
Signed-off-by: Thomas Huth <thuth@redhat.com>
26ba25
---
26ba25
 pc-bios/s390-ccw/cio.h | 2 +-
26ba25
 1 file changed, 1 insertion(+), 1 deletion(-)
26ba25
26ba25
diff --git a/pc-bios/s390-ccw/cio.h b/pc-bios/s390-ccw/cio.h
26ba25
index 55eaeee..1a0795f 100644
26ba25
--- a/pc-bios/s390-ccw/cio.h
26ba25
+++ b/pc-bios/s390-ccw/cio.h
26ba25
@@ -125,7 +125,7 @@ struct tpi_info {
26ba25
     __u32 reserved3  : 12;
26ba25
     __u32 int_type   : 3;
26ba25
     __u32 reserved4  : 12;
26ba25
-} __attribute__ ((packed));
26ba25
+} __attribute__ ((packed, aligned(4)));
26ba25
 
26ba25
 /* channel command word (type 1) */
26ba25
 struct ccw1 {
26ba25
-- 
26ba25
1.8.3.1
26ba25