From 2eaae09c31add79103331aa551e8f74de86cd037 Mon Sep 17 00:00:00 2001 From: Dave Tucker Date: Fri, 31 Jan 2025 18:23:54 +0000 Subject: [PATCH] chore(aya-ebpf-cty): Add mips support Signed-off-by: Dave Tucker --- ebpf/aya-ebpf-cty/build.rs | 2 +- ebpf/aya-ebpf-cty/src/lib.rs | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ebpf/aya-ebpf-cty/build.rs b/ebpf/aya-ebpf-cty/build.rs index 9567a0dc..7272a315 100644 --- a/ebpf/aya-ebpf-cty/build.rs +++ b/ebpf/aya-ebpf-cty/build.rs @@ -12,6 +12,6 @@ fn main() { } println!("cargo:rustc-cfg=bpf_target_arch=\"{arch}\""); } - println!("cargo::rustc-check-cfg=cfg(bpf_target_arch, values(\"x86_64\",\"arm\",\"aarch64\",\"riscv64\",\"powerpc64\",\"s390x\"))"); + println!("cargo::rustc-check-cfg=cfg(bpf_target_arch, values(\"x86_64\",\"arm\",\"aarch64\",\"riscv64\",\"powerpc64\",\"s390x\",\"mips\"))"); println!("cargo::rustc-check-cfg=cfg(target_arch, values(\"asmjs\",\"nvptx\",\"xtensa\"))"); } diff --git a/ebpf/aya-ebpf-cty/src/lib.rs b/ebpf/aya-ebpf-cty/src/lib.rs index d25b8505..6b0dd37d 100644 --- a/ebpf/aya-ebpf-cty/src/lib.rs +++ b/ebpf/aya-ebpf-cty/src/lib.rs @@ -33,6 +33,9 @@ mod ad { #[cfg(bpf_target_arch = "s390x")] pub type c_char = super::c_uchar; + #[cfg(bpf_target_arch = "mips")] + pub type c_char = super::c_uchar; + #[cfg(bpf_target_arch = "x86_64")] pub type c_char = super::c_schar; }