From 6c85a90b87ed307303d70894ef8bf72d0285306c Mon Sep 17 00:00:00 2001 From: Farid Zakaria Date: Wed, 21 May 2025 10:07:04 -0700 Subject: [PATCH] Change to atomic --- src/libutil/file-system.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libutil/file-system.cc b/src/libutil/file-system.cc index 0f86dd2b1..ad8cef38c 100644 --- a/src/libutil/file-system.cc +++ b/src/libutil/file-system.cc @@ -625,7 +625,7 @@ std::pair createTempFile(const Path & prefix) Path makeTempPath(const Path & root, const Path & suffix) { // start the counter at a random value to minimize issues with preexisting temp paths - static std::atomic_uint_fast32_t counter(std::random_device{}()); + static std::atomic counter(std::random_device{}()); auto tmpRoot = canonPath(root.empty() ? defaultTempDir() : root, true); return fmt("%1%/%2%-%3%-%4%", tmpRoot, suffix, getpid(), counter.fetch_add(1, std::memory_order_relaxed)); }