From f74f02e22c1de380dba67ceb21510ee07229b2e3 Mon Sep 17 00:00:00 2001 From: "Mario Limonciello (AMD)" Date: Mon, 18 Aug 2025 15:22:13 -0500 Subject: [PATCH] Add guard for compare_region_with_dump() Big endian architectures don't use the function. This fixes a FTBFS on big endian architectures. Change-Id: Ied3e12352e7fde73355f6a8a226eea0e5b101721 Signed-off-by: Mario Limonciello (AMD) Reviewed-on: https://review.coreboot.org/c/flashrom/+/88817 Reviewed-by: Anastasia Klimchuk Tested-by: build bot (Jenkins) --- libflashrom.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libflashrom.c b/libflashrom.c index a98d4ba53..15bd40ec9 100644 --- a/libflashrom.c +++ b/libflashrom.c @@ -455,6 +455,7 @@ bool flashrom_flag_get(const struct flashrom_flashctx *const flashctx, const enu } } +#ifdef __FLASHROM_LITTLE_ENDIAN__ static int compare_region_with_dump(const struct romentry *const a, const struct romentry *const b) { if (a->region.start != b->region.end @@ -463,6 +464,7 @@ static int compare_region_with_dump(const struct romentry *const a, const struct return 1; return 0; } +#endif /* __FLASHROM_LITTLE_ENDIAN__ */ int flashrom_layout_read_from_ifd(struct flashrom_layout **const layout, struct flashctx *const flashctx, const void *const dump, const size_t len)