From f9248a295d0ba057e73757babda00680a3ced4c9 Mon Sep 17 00:00:00 2001 From: Michael Tokarev Date: Sun, 16 Apr 2023 15:13:49 +0300 Subject: [PATCH] Disable compilation of Atomic64 code in metric.rs if there's no Atomic64 Atomic64 is not present, at least, on armel, mipsel and x32 platforms. Signed-off-by: Michael Tokarev --- src/metric.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/metric.rs b/src/metric.rs index c728161..64c79ed 100644 --- a/src/metric.rs +++ b/src/metric.rs @@ -11,6 +11,8 @@ //! of these components can choose what metrics they’re interested in and also //! can add their own custom metrics without the need to maintain forks. +#![cfg(target_has_atomic = "64")] + use std::sync::atomic::{AtomicU64, Ordering}; /// Abstraction over the common metric operations.