[libcamera-devel] [PATCH] libcamera: v4l2_videodevice: Don't use std::atomic specialization
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Sat Mar 7 00:10:50 CET 2020
The std::atomic_uint64_t specialization was missing from C++14, and only
added to C++17 (see LWG 2441). It was treated as a Defect Report and
backported to earlier C++ standards by gcc and clang, but is missing
from libstdc++ shipped with gcc 5 and gcc 6. Fix the compilation error
by using std::atomic<uint64_t> instead.
Fixes: 4e0d1eca10b7 ("libcamera: V4L2BufferCache: Improve cache eviction strategy")
Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
---
src/libcamera/include/v4l2_videodevice.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/libcamera/include/v4l2_videodevice.h b/src/libcamera/include/v4l2_videodevice.h
index 04802012d531..d051c9060f09 100644
--- a/src/libcamera/include/v4l2_videodevice.h
+++ b/src/libcamera/include/v4l2_videodevice.h
@@ -9,6 +9,7 @@
#include <atomic>
#include <memory>
+#include <stdint.h>
#include <string>
#include <vector>
@@ -142,7 +143,7 @@ private:
std::vector<Plane> planes_;
};
- std::atomic_uint64_t lastUsedCounter_;
+ std::atomic<uint64_t> lastUsedCounter_;
std::vector<Entry> cache_;
/* \todo Expose the miss counter through an instrumentation API. */
unsigned int missCounter_;
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list