Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: Fix build errors due to low kernel version
EM_RISCV, TRACEFS_MAGIC, MAP_FIXED_NOREPLACE macros are added to fix build errors since they are not declared in the low kernel version. The error messages are below: uftrace/cmds/record.c:1592:75: error: ‘EM_RISCV’ undeclared (first use in this function) uint16_t supported_machines[] = { EM_X86_64, EM_ARM, EM_AARCH64, EM_386, EM_RISCV }; ^ uftrace/utils/tracefs.c:26:53: error: ‘TRACEFS_MAGIC’ undeclared (first use in this function) if (!statfs(TRACEFS_DIR_PATH, &fs) && fs.f_type == TRACEFS_MAGIC) { ^ uftrace/arch/x86_64/mcount-dynamic.c:46:6: error: ‘MAP_FIXED_NOREPLACE’ undeclared (first use in this function) MAP_FIXED_NOREPLACE | MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); ^ Signed-off-by: Michelle Jin <[email protected]>
- Loading branch information