From d7111e8d99bb47aa3b29f4f33b3db075044a536f Mon Sep 17 00:00:00 2001 From: Mark Poliakov Date: Tue, 19 Nov 2024 01:51:44 +0200 Subject: [PATCH] libc: fix missing bcmp symbol --- userspace/lib/ygglibc/src/headers/string/mem.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/userspace/lib/ygglibc/src/headers/string/mem.rs b/userspace/lib/ygglibc/src/headers/string/mem.rs index e390c663..b4c3d954 100644 --- a/userspace/lib/ygglibc/src/headers/string/mem.rs +++ b/userspace/lib/ygglibc/src/headers/string/mem.rs @@ -91,3 +91,8 @@ pub unsafe extern "C" fn memmove(dst: *mut c_void, src: *const c_void, n: usize) pub unsafe extern "C" fn memcmp(s1: *const c_void, s2: *const c_void, n: usize) -> c_int { compiler_builtins::mem::memcmp(s1.cast(), s2.cast(), n) } + +#[no_mangle] +pub unsafe extern "C" fn bcmp(s1: *const c_void, s2: *const c_void, n: usize) -> c_int { + compiler_builtins::mem::bcmp(s1.cast(), s2.cast(), n) +}