summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Elliott Hughes <enh@google.com> 2022-10-06 23:18:07 +0000
committer Treehugger Robot <treehugger-gerrit@google.com> 2022-10-07 16:26:42 +0000
commit9cdaf65a8f94aa67727e066a8fb0edb2e70b08e0 (patch)
treec781abc800c36c0ad993b505cb56ff1d225b1505
parentab1d559aee05873f70494514922ad4b767c6a709 (diff)
Adapt to new STV_DEFAULT definition.
FreeBSD, whose ELF definitions we're switching to as part of the riscv64 work, defines STV_DEFAULT as 0x0 rather than 0, so this code no longer gets away with a silent redefinition. Test: treehugger Change-Id: I3d6e0186cef615c585e416ba0fa64229ad18d38c
-rw-r--r--libelffile/elf/elf_utils.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/libelffile/elf/elf_utils.h b/libelffile/elf/elf_utils.h
index 9c4f0d81ba..da67b8cc73 100644
--- a/libelffile/elf/elf_utils.h
+++ b/libelffile/elf/elf_utils.h
@@ -65,7 +65,9 @@ struct ElfTypes64 {
#define EI_ABIVERSION 8
#define EM_ARM 40
+#if !defined(STV_DEFAULT)
#define STV_DEFAULT 0
+#endif
#define EM_AARCH64 183