]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
common/fair_mutex: include <thread> only with CEPH_DEBUG_MUTEX
authorMax Kellermann <max.kellermann@ionos.com>
Tue, 29 Oct 2024 20:20:31 +0000 (21:20 +0100)
committerMax Kellermann <max.kellermann@ionos.com>
Thu, 6 Mar 2025 07:53:09 +0000 (08:53 +0100)
The header is only needed for std::this_thread::get_id() which is in
the `#ifdef CEPH_DEBUG_MUTEX` section.

Signed-off-by: Max Kellermann <max.kellermann@ionos.com>
src/common/fair_mutex.h

index 9baa0440048932e94eb058b7317b1eae9e53f1c8..3bf3b9b4aa29955f83efb55e78982dd40a6a9b44 100644 (file)
@@ -4,7 +4,10 @@
 
 #include "common/ceph_mutex.h"
 
-#include <thread>
+#ifdef CEPH_DEBUG_MUTEX
+#include <thread> // for std::this_thread::get_id()
+#endif
+
 #include <string>
 
 namespace ceph {