about summary refs log tree commit diff
path: root/arch
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2019-11-05 10:15:11 -0500
committerRich Felker <dalias@aerifal.cx>2019-11-05 10:15:11 -0500
commit90251cf73dfdd44e7a3f085d236e89a7dff1b00b (patch)
tree8b5a8541c83b94cc1a0cca176b95b4ed3d69081c /arch
parent129118db4d16e3aea484255413fed3b5150ce201 (diff)
downloadmusl-90251cf73dfdd44e7a3f085d236e89a7dff1b00b.tar.gz
musl-90251cf73dfdd44e7a3f085d236e89a7dff1b00b.tar.xz
musl-90251cf73dfdd44e7a3f085d236e89a7dff1b00b.zip
fix build regression on mips64 due to endian.h removal
commit 4d3a162d001a93edd285fb6603a883c30ae553ba overlooked that the
mips64 reloc.h dependent on endian.h not only for setting the ABI ldso
name to match the byte order, but also for use of the byte swapping
macros. they are needed to override R_TYPE, R_SYM, and R_INFO, to
compensate for a mips "quirk" of always using big endian order for
symbol references in relocations.

part of that commit canot be reverted because the original code was
wrong: it's invalid to define _GNU_SOURCE or any feature test macro
in reloc.h, or anywhere except at the top of a source file. however,
thanks to commit 316730cdc7a330cddf288b4e5c1de5daa64e19f4, the feature
test macro is no longer needed to access the endian-swapping macros,
so simply bringing back the #include directive suffices.
Diffstat (limited to 'arch')
-rw-r--r--arch/mips64/reloc.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/mips64/reloc.h b/arch/mips64/reloc.h
index 7e61e225..fdb5edc9 100644
--- a/arch/mips64/reloc.h
+++ b/arch/mips64/reloc.h
@@ -27,6 +27,8 @@
 #define REL_DTPOFF      R_MIPS_TLS_DTPREL64
 #define REL_TPOFF       R_MIPS_TLS_TPREL64
 
+#include <endian.h>
+
 #undef R_TYPE
 #undef R_SYM
 #undef R_INFO