1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-09-13 16:51:58 +02:00

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) <superm1@kernel.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/88817
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Mario Limonciello (AMD)
2025-08-18 15:22:13 -05:00
committed by Anastasia Klimchuk
parent 182902ee01
commit f74f02e22c

View File

@@ -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) static int compare_region_with_dump(const struct romentry *const a, const struct romentry *const b)
{ {
if (a->region.start != b->region.end 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 1;
return 0; return 0;
} }
#endif /* __FLASHROM_LITTLE_ENDIAN__ */
int flashrom_layout_read_from_ifd(struct flashrom_layout **const layout, struct flashctx *const flashctx, int flashrom_layout_read_from_ifd(struct flashrom_layout **const layout, struct flashctx *const flashctx,
const void *const dump, const size_t len) const void *const dump, const size_t len)