[PATCH 1/2] include/libcamera/base/file.h: add missing <stdint.h> include

Laurent Pinchart laurent.pinchart at ideasonboard.com
Sun Aug 4 13:43:36 CEST 2024


Hi Sergei,

Thank you for the patch.

The subject line should read

"libcamera: base: file: Add missing <stdint.h> include"

to match the usual style.

On Sun, Aug 04, 2024 at 07:03:59AM +0100, Sergei Trofimovich wrote:
> Without the change the build fails on upcoming `gcc-15` as:
> 
>     In file included from ../src/libcamera/base/file.cpp:8:
>     ../include/libcamera/base/file.h:62:33: error: 'uint8_t' was not declared in this scope
>        62 |         ssize_t read(const Span<uint8_t> &data);
>           |                                 ^~~~~~~

Much more importantly, the commit message is missing your Signed-off-by
line. See https://libcamera.org/contributing.html#submitting-patches

If it were just for the subject line I would change it myself before
applying the patch, but the missing SoB will require a v2 I'm afraid.

These comments apply to patch 2/2 too.

> ---
>  include/libcamera/base/file.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/include/libcamera/base/file.h b/include/libcamera/base/file.h
> index 5637934c..192668ab 100644
> --- a/include/libcamera/base/file.h
> +++ b/include/libcamera/base/file.h
> @@ -7,6 +7,7 @@
>  
>  #pragma once
>  
> +#include <stdint.h>
>  #include <sys/types.h>
>  
>  #include <map>

It looks like sys/types.h was added in the wrong place. Could you, while
at it, fix that so that all the C and C++ standard includes are grouped
together ? It should look like

#include <map>
#include <stdint.h>
#include <string>
#include <sys/types.h>

-- 
Regards,

Laurent Pinchart


More information about the libcamera-devel mailing list