Skip to content

Commit af6ce56

Browse files
author
git apple-llvm automerger
committed
Merge commit '440d9712ebf6' from llvm.org/main into next
2 parents cc1cc41 + 440d971 commit af6ce56

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

compiler-rt/lib/profile/InstrProfilingPlatformLinux.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,15 @@
1717
#include "InstrProfiling.h"
1818
#include "InstrProfilingInternal.h"
1919

20+
#if defined(__FreeBSD__) && !defined(ElfW)
21+
/*
22+
* FreeBSD's elf.h and link.h headers do not define the ElfW(type) macro yet.
23+
* If this is added to all supported FreeBSD versions in the future, this
24+
* compatibility macro can be removed.
25+
*/
26+
#define ElfW(type) __ElfN(type)
27+
#endif
28+
2029
#define PROF_DATA_START INSTR_PROF_SECT_START(INSTR_PROF_DATA_COMMON)
2130
#define PROF_DATA_STOP INSTR_PROF_SECT_STOP(INSTR_PROF_DATA_COMMON)
2231
#define PROF_NAME_START INSTR_PROF_SECT_START(INSTR_PROF_NAME_COMMON)

0 commit comments

Comments
 (0)