Skip to content

Commit d6165bf

Browse files
joriskleibersquell
authored andcommitted
remove EM_RISCV workaround
1 parent ceb3152 commit d6165bf

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ rust-version = "1.70"
1515
default-run = "sudo"
1616

1717
[dependencies]
18-
libc = "0.2.152"
18+
libc = "0.2.176"
1919
glob = "0.3.0"
2020

2121
[features]

src/exec/noexec.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,11 @@ const AUDIT_ARCH_MIPSEL64: u32 = libc::EM_MIPS as u32 | __AUDIT_ARCH_64BIT | __A
4040
const AUDIT_ARCH_PPC: u32 = libc::EM_PPC as u32;
4141
const AUDIT_ARCH_PPC64: u32 = libc::EM_PPC64 as u32 | __AUDIT_ARCH_64BIT;
4242
const AUDIT_ARCH_PPC64LE: u32 = libc::EM_PPC64 as u32 | __AUDIT_ARCH_64BIT | __AUDIT_ARCH_LE;
43-
const AUDIT_ARCH_RISCV32: u32 = EM_RISCV as u32 | __AUDIT_ARCH_LE;
44-
const AUDIT_ARCH_RISCV64: u32 = EM_RISCV as u32 | __AUDIT_ARCH_64BIT | __AUDIT_ARCH_LE;
43+
const AUDIT_ARCH_RISCV32: u32 = libc::EM_RISCV as u32 | __AUDIT_ARCH_LE;
44+
const AUDIT_ARCH_RISCV64: u32 = libc::EM_RISCV as u32 | __AUDIT_ARCH_64BIT | __AUDIT_ARCH_LE;
4545
const AUDIT_ARCH_S390X: u32 = libc::EM_S390 as u32 | __AUDIT_ARCH_64BIT;
4646
const AUDIT_ARCH_X86_64: u32 = libc::EM_X86_64 as u32 | __AUDIT_ARCH_64BIT | __AUDIT_ARCH_LE;
4747

48-
// workaround: libc doesn't have EM_RISCV yet, so we define it ourselves
49-
// see: https://github.com/rust-lang/libc/issues/4603
50-
const EM_RISCV: u16 = 243;
51-
5248
/// # Safety
5349
///
5450
/// You must follow the rules the Linux man page specifies for the chosen

0 commit comments

Comments
 (0)