From 236245ec7dc79b03e5e8011d4bac4880126752da Mon Sep 17 00:00:00 2001 From: Karthikeyan Ramasubramanian Date: Tue, 6 Sep 2022 14:02:41 -0600 Subject: util/amdfwtool: Include the header with __packed definition Checkpatch script recommends to use __packed instead of __attribute__((packed)). Currently the build rule for amdfwtool does not include the required header file with __packed definition. Update the compiler flag to include the required header file. BUG=None TEST=Build amdfwtool. Signed-off-by: Karthikeyan Ramasubramanian Change-Id: I448cbad533608dd5c2bd4f2d827fcc5db5dee5cb Reviewed-on: https://review.coreboot.org/c/coreboot/+/67384 Reviewed-by: Jon Murphy Tested-by: build bot (Jenkins) --- util/amdfwtool/Makefile | 2 ++ util/amdfwtool/Makefile.inc | 1 + util/amdfwtool/amdfwtool.h | 1 + 3 files changed, 4 insertions(+) diff --git a/util/amdfwtool/Makefile b/util/amdfwtool/Makefile index bdc3dc3432..e0ce3b76ab 100644 --- a/util/amdfwtool/Makefile +++ b/util/amdfwtool/Makefile @@ -1,5 +1,6 @@ # SPDX-License-Identifier: BSD-3-Clause +top ?= $(abspath ../..) HOSTCC ?= cc READ_SRC = amdfwread.c @@ -10,6 +11,7 @@ HEADER=amdfwtool.h TARGETS = amdfwread amdfwtool WERROR=-Werror CFLAGS=-O2 -Wall -Wextra -Wshadow ${WERROR} +CFLAGS += -I $(top)/src/commonlib/bsd/include all: $(TARGETS) diff --git a/util/amdfwtool/Makefile.inc b/util/amdfwtool/Makefile.inc index 4b7db76e4d..d45d273c45 100644 --- a/util/amdfwtool/Makefile.inc +++ b/util/amdfwtool/Makefile.inc @@ -3,6 +3,7 @@ amdfwtoolobj = amdfwtool.o data_parse.o AMDFWTOOLCFLAGS=-O2 -Wall -Wextra -Wshadow -Werror +AMDFWTOOLCFLAGS += -I $(top)/src/commonlib/bsd/include $(objutil)/amdfwtool/%.o: $(top)/util/amdfwtool/%.c # $(HEADER) $(HOSTCC) $(AMDFWTOOLCFLAGS) $(HOSTCFLAGS) -c -o $@ $< diff --git a/util/amdfwtool/amdfwtool.h b/util/amdfwtool/amdfwtool.h index 027a8f30f3..6b13edcb79 100644 --- a/util/amdfwtool/amdfwtool.h +++ b/util/amdfwtool/amdfwtool.h @@ -3,6 +3,7 @@ #ifndef _AMD_FW_TOOL_H_ #define _AMD_FW_TOOL_H_ +#include #include #include -- cgit v1.2.3