From ac1f17d84ea0bfe8d32f8414d5b0ff8834b867c8 Mon Sep 17 00:00:00 2001 From: eternal-flame-AD Date: Fri, 22 Nov 2024 13:47:42 -0600 Subject: [PATCH] small consistency fixes Signed-off-by: eternal-flame-AD --- src/lib.rs | 2 +- src/main.rs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) 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();