git: 14636c4edfdc - main - sysutils/flashrom: fix build on big-endian

From: Piotr Kubaj <pkubaj_at_FreeBSD.org>
Date: Mon, 10 Nov 2025 23:33:25 UTC
The branch main has been updated by pkubaj:

URL: https://cgit.FreeBSD.org/ports/commit/?id=14636c4edfdcd75a9780b7ef3e0eb2dcf97cfa59

commit 14636c4edfdcd75a9780b7ef3e0eb2dcf97cfa59
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2025-11-05 10:53:18 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2025-11-10 23:33:20 +0000

    sysutils/flashrom: fix build on big-endian
    
    compare_region_with_dump() is used only in a code for little-endian:
    ../libflashrom.c:458:12: error: unused function 'compare_region_with_dump' [-Werror,-Wunused-function]
      458 | static int compare_region_with_dump(const struct romentry *const a, const struct romentry *const b)
          |            ^~~~~~~~~~~~~~~~~~~~~~~~
    1 error generated.
---
 sysutils/flashrom/files/patch-libflashrom.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/sysutils/flashrom/files/patch-libflashrom.c b/sysutils/flashrom/files/patch-libflashrom.c
new file mode 100644
index 000000000000..e43530b69588
--- /dev/null
+++ b/sysutils/flashrom/files/patch-libflashrom.c
@@ -0,0 +1,18 @@
+--- libflashrom.c.orig	2025-11-05 09:42:11 UTC
++++ libflashrom.c
+@@ -455,6 +455,7 @@ bool flashrom_flag_get(const struct flashrom_flashctx 
+ 	}
+ }
+ 
++#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 romen
+ 			return 1;
+ 	return 0;
+ }
++#endif
+ 
+ int flashrom_layout_read_from_ifd(struct flashrom_layout **const layout, struct flashctx *const flashctx,
+ 				  const void *const dump, const size_t len)