summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/libcamera/base/shared_fd.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/libcamera/base/shared_fd.h b/include/libcamera/base/shared_fd.h
index 20219224..e53a8b88 100644
--- a/include/libcamera/base/shared_fd.h
+++ b/include/libcamera/base/shared_fd.h
@@ -46,4 +46,14 @@ private:
std::shared_ptr<Descriptor> fd_;
};
+static inline bool operator==(const SharedFD &lhs, const SharedFD &rhs)
+{
+ return lhs.get() == rhs.get();
+}
+
+static inline bool operator!=(const SharedFD &lhs, const SharedFD &rhs)
+{
+ return !(lhs == rhs);
+}
+
} /* namespace libcamera */