From 76bab30cd4494b6fd976f094dfd6a12b15ac0507 Mon Sep 17 00:00:00 2001 From: febo Date: Wed, 25 Sep 2024 10:49:17 +0100 Subject: [PATCH] Fix extern definition --- sdk/pinocchio/src/entrypoint.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/sdk/pinocchio/src/entrypoint.rs b/sdk/pinocchio/src/entrypoint.rs index 0f96b0d..14e3422 100644 --- a/sdk/pinocchio/src/entrypoint.rs +++ b/sdk/pinocchio/src/entrypoint.rs @@ -229,14 +229,14 @@ macro_rules! custom_panic_default { macro_rules! custom_heap_default { () => { #[cfg(all(not(feature = "custom-heap"), target_os = "solana"))] - { - extern crate alloc; - #[global_allocator] - static A: $crate::entrypoint::BumpAllocator = $crate::entrypoint::BumpAllocator { - start: $crate::entrypoint::HEAP_START_ADDRESS as usize, - len: $crate::entrypoint::HEAP_LENGTH, - }; - } + extern crate alloc; + + #[cfg(all(not(feature = "custom-heap"), target_os = "solana"))] + #[global_allocator] + static A: $crate::entrypoint::BumpAllocator = $crate::entrypoint::BumpAllocator { + start: $crate::entrypoint::HEAP_START_ADDRESS as usize, + len: $crate::entrypoint::HEAP_LENGTH, + }; }; }