summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-03-07 01:00:03 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-03-07 01:15:43 +0200
commit2cc90af8c7b6ac90b62ed9794d6176562b788292 (patch)
tree683e089d29098f71a38c5b8042efe931524d251e /src
parent4e0d1eca10b7d2cf0ccbdbebee698d6b716d075b (diff)
libcamera: v4l2_videodevice: Don't use std::atomic specialization
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@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Diffstat (limited to 'src')
-rw-r--r--src/libcamera/include/v4l2_videodevice.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libcamera/include/v4l2_videodevice.h b/src/libcamera/include/v4l2_videodevice.h
index 04802012..d051c906 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_;