From b0f999419e0ae294437f0cfec2c8324c66621c44 Mon Sep 17 00:00:00 2001 From: Quentin JEROME Date: Wed, 19 Apr 2023 10:45:01 +0200 Subject: [PATCH] make memset return u8 Signed-off-by: Quentin JEROME --- bpf/aya-bpf/src/lib.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bpf/aya-bpf/src/lib.rs b/bpf/aya-bpf/src/lib.rs index 57e0e372..32d47e35 100644 --- a/bpf/aya-bpf/src/lib.rs +++ b/bpf/aya-bpf/src/lib.rs @@ -57,11 +57,12 @@ pub trait BpfContext { } #[no_mangle] -pub unsafe extern "C" fn memset(s: *mut u8, c: c_int, n: usize) { +pub unsafe extern "C" fn memset(s: *mut u8, c: c_int, n: usize) -> u8 { let base = s as usize; for i in 0..n { *((base + i) as *mut u8) = c as u8; } + 0 } #[no_mangle]