diff --git a/include/libcamera/base/thread_annotations.h b/include/libcamera/base/thread_annotations.h
index e81929f674d7..25b3c7b6cf92 100644
--- a/include/libcamera/base/thread_annotations.h
+++ b/include/libcamera/base/thread_annotations.h
@@ -7,6 +7,8 @@
 
 #pragma once
 
+#include <libcamera/base/private.h>
+
 /*
  * Enable thread safety attributes only with clang.
  * The attributes can be safely erased when compiling with other compilers.
