diff --git a/src/lib.rs b/src/lib.rs index e3303ef..8715772 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -822,7 +822,7 @@ pub struct App { pub fn register_cancel_handler() { #[cfg(target_family = "unix")] unsafe { - unsafe fn cancel_handler(_: libc::c_int) { + unsafe extern "C" fn cancel_handler(_: libc::c_int) { log::error!("Received cancel signal, stopping thread"); libc::pthread_exit(&sandbox::EXIT_TIMEOUT as *const _ as *mut _); } diff --git a/src/main.rs b/src/main.rs index 4acb131..62e3e1e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -241,6 +241,7 @@ fn main() { return; } + #[cfg(feature = "metrics")] { let reg = prometheus::default_registry();