From 4957eda2c17ff43d52ece67b118ec304e5c41f11 Mon Sep 17 00:00:00 2001 From: B I Mohammed Abbas Date: Fri, 20 Sep 2024 17:26:42 +0530 Subject: [PATCH] Allow unused unsafe for vxworks in alligned_malloc to resolve build errors --- library/std/src/sys/alloc/unix.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/library/std/src/sys/alloc/unix.rs b/library/std/src/sys/alloc/unix.rs index 46ed7de7162..dfce50aec13 100644 --- a/library/std/src/sys/alloc/unix.rs +++ b/library/std/src/sys/alloc/unix.rs @@ -71,6 +71,7 @@ cfg_if::cfg_if! { } } else { #[inline] + #[cfg_attr(target_os = "vxworks", allow(unused_unsafe))] unsafe fn aligned_malloc(layout: &Layout) -> *mut u8 { let mut out = ptr::null_mut(); // We prefer posix_memalign over aligned_alloc since it is more widely available, and