Jacob Garber has uploaded this change for review.

View Change

libpayload: Include missing compiler.h

These header files define various structs like so:

struct struct_name { ... } __packed;

However, these header files do not include the compiler.h macro that
defines what __packed is, so they are actually defining a variable named
__packed and *not* declaring a packed struct. This leads to defining the
same variable multiple times, which was caught by GCC 10. Include the
missing <compiler.h> header to fix this.

Change-Id: Ia67182520dc94149e06fe9e03a14b3fc2ee29973
Signed-off-by: Jacob Garber <jgarber1@ualberta.ca>
---
M payloads/libpayload/drivers/usb/uhci_private.h
M payloads/libpayload/drivers/video/bitmap.h
M payloads/libpayload/include/arm/arch/exception.h
M payloads/libpayload/include/arm64/arch/exception.h
M payloads/libpayload/include/fmap_serialized.h
M payloads/libpayload/include/x86/arch/exception.h
6 files changed, 7 insertions(+), 0 deletions(-)

git pull ssh://review.coreboot.org:29418/coreboot refs/changes/53/47153/1
diff --git a/payloads/libpayload/drivers/usb/uhci_private.h b/payloads/libpayload/drivers/usb/uhci_private.h
index 9df8f3d..9854f15 100644
--- a/payloads/libpayload/drivers/usb/uhci_private.h
+++ b/payloads/libpayload/drivers/usb/uhci_private.h
@@ -29,6 +29,8 @@
#ifndef __UHCI_PRIVATE_H
#define __UHCI_PRIVATE_H

+#include <compiler.h>
+
typedef enum { UHCI_SETUP = 0x2d, UHCI_IN = 0x69, UHCI_OUT = 0xe1 } uhci_pid_t;

typedef u32 flistp_t;
diff --git a/payloads/libpayload/drivers/video/bitmap.h b/payloads/libpayload/drivers/video/bitmap.h
index 7a596f2..0178961 100644
--- a/payloads/libpayload/drivers/video/bitmap.h
+++ b/payloads/libpayload/drivers/video/bitmap.h
@@ -29,6 +29,7 @@
#ifndef __BITMAP_H__
#define __BITMAP_H__

+#include <compiler.h>
#include <stdint.h>

struct bitmap_file_header {
diff --git a/payloads/libpayload/include/arm/arch/exception.h b/payloads/libpayload/include/arm/arch/exception.h
index ee8520e..2360fd1 100644
--- a/payloads/libpayload/include/arm/arch/exception.h
+++ b/payloads/libpayload/include/arm/arch/exception.h
@@ -29,6 +29,7 @@
#ifndef _ARCH_EXCEPTION_H
#define _ARCH_EXCEPTION_H

+#include <compiler.h>
#include <stdint.h>

void exception_dispatch(u32 idx);
diff --git a/payloads/libpayload/include/arm64/arch/exception.h b/payloads/libpayload/include/arm64/arch/exception.h
index 1b4d58a..754c0ce 100644
--- a/payloads/libpayload/include/arm64/arch/exception.h
+++ b/payloads/libpayload/include/arm64/arch/exception.h
@@ -53,6 +53,7 @@

#ifndef __ASSEMBLER__

+#include <compiler.h>
#include <stddef.h>
#include <stdint.h>

diff --git a/payloads/libpayload/include/fmap_serialized.h b/payloads/libpayload/include/fmap_serialized.h
index 53a09af..f5c7d03 100644
--- a/payloads/libpayload/include/fmap_serialized.h
+++ b/payloads/libpayload/include/fmap_serialized.h
@@ -36,6 +36,7 @@
#ifndef FLASHMAP_SERIALIZED_H__
#define FLASHMAP_SERIALIZED_H__

+#include <compiler.h>
#include <stdint.h>

#define FMAP_SIGNATURE "__FMAP__"
diff --git a/payloads/libpayload/include/x86/arch/exception.h b/payloads/libpayload/include/x86/arch/exception.h
index d88029b..c4e8fd3 100644
--- a/payloads/libpayload/include/x86/arch/exception.h
+++ b/payloads/libpayload/include/x86/arch/exception.h
@@ -29,6 +29,7 @@
#ifndef _ARCH_EXCEPTION_H
#define _ARCH_EXCEPTION_H

+#include <compiler.h>
#include <stdint.h>

void exception_init_asm(void);

To view, visit change 47153. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ia67182520dc94149e06fe9e03a14b3fc2ee29973
Gerrit-Change-Number: 47153
Gerrit-PatchSet: 1
Gerrit-Owner: Jacob Garber <jgarber1@ualberta.ca>
Gerrit-MessageType: newchange