From 59795716487fbb8a9910ac503bcea1e0cb08c932 Mon Sep 17 00:00:00 2001 From: Adam Spofford <93943719+adamspofford-dfinity@users.noreply.github.com> Date: Wed, 24 Jul 2024 10:48:12 -0700 Subject: [PATCH] Use ld-compatible symbol in ic-cdk-timers (#503) --- src/ic-cdk-timers/src/lib.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/ic-cdk-timers/src/lib.rs b/src/ic-cdk-timers/src/lib.rs index 863ae8a16..845958d40 100644 --- a/src/ic-cdk-timers/src/lib.rs +++ b/src/ic-cdk-timers/src/lib.rs @@ -260,7 +260,14 @@ fn update_ic0_timer() { }); } -#[export_name = "canister_update timer_executor"] +#[cfg_attr( + target_family = "wasm", + export_name = "canister_update timer_executor" +)] +#[cfg_attr( + not(target_family = "wasm"), + export_name = "canister_update_ic_cdk_internal.timer_executor" +)] extern "C" fn timer_executor() { if ic_cdk::api::caller() != ic_cdk::api::id() { ic_cdk::trap("This function is internal to ic-cdk and should not be called externally.");