Page MenuHomeFreeBSD

D44734.id136837.diff
No OneTemporary

D44734.id136837.diff

Index: sbin/ldconfig/elfhints.c
===================================================================
--- sbin/ldconfig/elfhints.c
+++ sbin/ldconfig/elfhints.c
@@ -220,7 +220,7 @@
close(fd);
hdr = (struct elfhints_hdr *)mapbase;
- is_be = be32toh(hdr->magic) == ELFHINTS_MAGIC;
+ is_be = hdr->magic == htobe32(ELFHINTS_MAGIC);
if (COND_SWAP(hdr->magic) != ELFHINTS_MAGIC)
errx(1, "\"%s\": invalid file format", hintsfile);
if (force_be && !is_be)
@@ -246,10 +246,10 @@
int i;
/*
- * Remove "be32toh(1) == 1" from this condition to create
- * little-endian hints files on all architectures by default.
+ * Create little-endian hints files on all architectures unless
+ * ldconfig has been invoked with the -B option.
*/
- is_be = be32toh(1) == 1 || force_be;
+ is_be = force_be;
if (merge)
read_elf_hints(hintsfile, false, force_be);
for (i = 0; i < argc; i++) {

File Metadata

Mime Type
text/plain
Expires
Mon, Apr 13, 4:21 PM (12 h, 45 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31416812
Default Alt Text
D44734.id136837.diff (895 B)

Event Timeline