Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F152091639
D44734.id136837.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
895 B
Referenced Files
None
Subscribers
None
D44734.id136837.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D44734: Create little-endian hints files on all architectures
Attached
Detach File
Event Timeline
Log In to Comment