File tree 1 file changed +10
-4
lines changed
1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change 10
10
#include < fstream>
11
11
#include < algorithm>
12
12
13
- #if defined(_CPU_AARCH64_) || __GLIBC_PREREQ(2, 16)
13
+ // This nesting is required to allow compilation on musl
14
+ #define USE_DYN_GETAUXVAL
15
+ #if defined(_CPU_AARCH64_)
16
+ # undef USE_DYN_GETAUXVAL
14
17
# include < sys/auxv.h>
15
- #else
16
- # define DYN_GETAUXVAL
18
+ #elif defined(__GLIBC_PREREQ)
19
+ # if __GLIBC_PREREQ(2, 16)
20
+ # undef USE_DYN_GETAUXVAL
21
+ # include < sys/auxv.h>
22
+ # endif
17
23
#endif
18
24
19
25
namespace ARM {
@@ -498,7 +504,7 @@ static constexpr size_t ncpu_names = sizeof(cpus) / sizeof(cpus[0]);
498
504
# define AT_HWCAP2 26
499
505
#endif
500
506
501
- #if defined(DYN_GETAUXVAL )
507
+ #if defined(USE_DYN_GETAUXVAL )
502
508
static unsigned long getauxval_procfs (unsigned long type)
503
509
{
504
510
int fd = open (" /proc/self/auxv" , O_RDONLY);
You can’t perform that action at this time.
0 commit comments