aboutsummaryrefslogtreecommitdiff
path: root/libexec
diff options
context:
space:
mode:
authorMichael Tuexen <tuexen@FreeBSD.org>2024-03-22 13:50:25 +0000
committerMichael Tuexen <tuexen@FreeBSD.org>2024-03-22 13:50:25 +0000
commitda2d6e2815d7694e3ccbd561508074c547b02dd6 (patch)
tree630d1d6c28136a0dd3bc71b305fef247b0fe118f /libexec
parent56b40c285b5994d64e7e8fba821c57f86e91502c (diff)
Diffstat (limited to 'libexec')
-rw-r--r--libexec/rtld-elf/rtld.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c
index fbf5b3e20a1f..3071eacbc995 100644
--- a/libexec/rtld-elf/rtld.c
+++ b/libexec/rtld-elf/rtld.c
@@ -2081,7 +2081,7 @@ gethints(bool nostdlib)
uint32_t strtab; /* Offset of string table in file */
uint32_t dirlist; /* Offset of directory list in string table */
uint32_t dirlistlen; /* strlen(dirlist) */
- bool is_le;
+ bool is_le; /* Does the hints file use little endian */
bool skip;
/* First call, read the hints file */
@@ -2108,7 +2108,7 @@ cleanup1:
hdr.dirlistlen = 0;
return (NULL);
}
- is_le = /*le32toh(1) == 1 || */ hdr.magic == ELFHINTS_MAGIC;
+ is_le = /*htole32(1) == 1 || */ hdr.magic == htole32(ELFHINTS_MAGIC);
dbg("host byte-order: %s-endian", le32toh(1) == 1 ? "little" : "big");
dbg("hints file byte-order: %s-endian", is_le ? "little" : "big");
dbg("verify swap macros: le32toh(0x12345678) == %#010x, "