From 557a0b8ac2e1e94ed85e204a7556a1de4fcd6c70 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 --- std/src/sys/alloc/unix.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/std/src/sys/alloc/unix.rs b/std/src/sys/alloc/unix.rs index 46ed7de7162f8..dfce50aec130d 100644 --- a/std/src/sys/alloc/unix.rs +++ b/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