[libcamera-devel] [PATCH] rpi: controller: awb: Include <functional>

Jacopo Mondi jacopo at jmondi.org
Thu Jul 28 17:54:33 CEST 2022


Building on gcc8 on Debian 10 fails with:

 asyncThread_ = std::thread(std::bind(&Awb::asyncFunc, this));
../src/ipa/raspberrypi/controller/rpi/awb.cpp:177:34: note: ‘std::bind’
is defined in header ‘<functional>’; did you forget to ‘#include
<functional>’?

Fix that by including <functional> in awb.cpp.

Reported-by: https://buildbot.libcamera.org/#/builders/6/builds/414
Signed-off-by: Jacopo Mondi <jacopo at jmondi.org>

---
I diff-ed to check if std::bind() was introduced in the last great refactor,
but it seems to be there since 0db2c8dc75e466e7648dc1b95380495c6a126349 from
May 2020. Can't tell why it didn't fail so far, nor why it only fails on gcc8.

But it does anyway fix the build:
https://buildbot.libcamera.org/#/builders/6/builds/421
---
 src/ipa/raspberrypi/controller/rpi/awb.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/ipa/raspberrypi/controller/rpi/awb.cpp b/src/ipa/raspberrypi/controller/rpi/awb.cpp
index 6c2b627d234b..94629b121eb0 100644
--- a/src/ipa/raspberrypi/controller/rpi/awb.cpp
+++ b/src/ipa/raspberrypi/controller/rpi/awb.cpp
@@ -5,6 +5,8 @@
  * awb.cpp - AWB control algorithm
  */

+#include <functional>
+
 #include <libcamera/base/log.h>

 #include "../lux_status.h"
--
2.37.1



More information about the libcamera-devel mailing list