[libcamera-devel] [PATCH] ipa: raspberrypi: Fix compiler error, add functional include

Laurent Pinchart laurent.pinchart at ideasonboard.com
Fri Jul 29 14:02:36 CEST 2022


Hi Eric,

On Fri, Jul 29, 2022 at 10:56:26AM +0100, Eric Curtin wrote:
> gcc version '12.1.1 20220507 (Red Hat 12.1.1-1)' fails with the
> following error on Fedora 36. This file should include the functional
> header as it uses std::function.
> 
> In file included from ../src/ipa/raspberrypi/controller/rpi/ccm.h:12,
>                  from ../src/ipa/raspberrypi/controller/rpi/ccm.cpp:15:
> ../src/ipa/raspberrypi/controller/rpi/../pwl.h:97:18: error: ‘std::function’ has not been declared
>    97 |         void map(std::function<void(double x, double y)> f) const;
> 
> Signed-off-by: Eric Curtin <ecurtin at redhat.com>

I've merged the previous version of the fix already, with an updated
commit message.

> ---
>  src/ipa/raspberrypi/controller/pwl.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/src/ipa/raspberrypi/controller/pwl.h b/src/ipa/raspberrypi/controller/pwl.h
> index 546482cd..aacf6039 100644
> --- a/src/ipa/raspberrypi/controller/pwl.h
> +++ b/src/ipa/raspberrypi/controller/pwl.h
> @@ -6,6 +6,7 @@
>   */
>  #pragma once
>  
> +#include <functional>
>  #include <math.h>
>  #include <vector>
>  

-- 
Regards,

Laurent Pinchart


More information about the libcamera-devel mailing list