Fix GCC 11.4.0 build on hosts with GCC 14

This commit is contained in:
krant 2024-05-11 19:11:21 +03:00
parent fd6be58297
commit d3e2649b76
1 changed files with 13 additions and 0 deletions

View File

@ -0,0 +1,13 @@
diff --git a/libiberty/simple-object-mach-o.c b/libiberty/simple-object-mach-o.c
index 72b69d19c216..a8869e7c6395 100644
--- a/libiberty/simple-object-mach-o.c
+++ b/libiberty/simple-object-mach-o.c
@@ -1228,7 +1228,7 @@ simple_object_mach_o_write_segment (simple_object_write *sobj, int descriptor,
/* Swap the indices, if required. */
for (i = 0; i < (nsects_in * 4); ++i)
- set_32 (&index[i], index[i]);
+ set_32 ((unsigned char *) &index[i], index[i]);
sechdr_offset += sechdrsize;