dma_buf_allocator.h: Fix build with gcc-15
diff mbox series

Message ID 20250328040338.71440-2-tho3.nguyen@lge.com
State Rejected
Headers show
Series
  • dma_buf_allocator.h: Fix build with gcc-15
Related show

Commit Message

THO DAT NGUYEN/LGEDV ADVANCED PLATFORM TEAM March 28, 2025, 4:03 a.m. UTC
To fix:
...
In file included from ../git/src/libcamera/dma_buf_allocator.cpp:9:
../git/include/libcamera/internal/dma_buf_allocator.h:66:19: error: 'uint64_t' has not been declared
   66 |         void sync(uint64_t step);
      |                   ^~~~~~~~
../git/include/libcamera/internal/dma_buf_allocator.h:17:1: note: 'uint64_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
...

Signed-off-by: tho3.nguyen <tho3.nguyen@lge.com>
---
 include/libcamera/internal/dma_buf_allocator.h | 1 +
 1 file changed, 1 insertion(+)

Comments

Laurent Pinchart March 28, 2025, 11:03 a.m. UTC | #1
Hello,

Thank you for the patch.

On Fri, Mar 28, 2025 at 01:03:38PM +0900, tho3.nguyen wrote:
> To fix:
> ...
> In file included from ../git/src/libcamera/dma_buf_allocator.cpp:9:
> ../git/include/libcamera/internal/dma_buf_allocator.h:66:19: error: 'uint64_t' has not been declared
>    66 |         void sync(uint64_t step);
>       |                   ^~~~~~~~
> ../git/include/libcamera/internal/dma_buf_allocator.h:17:1: note: 'uint64_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
> ...
> 
> Signed-off-by: tho3.nguyen <tho3.nguyen@lge.com>
> ---
>  include/libcamera/internal/dma_buf_allocator.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/include/libcamera/internal/dma_buf_allocator.h b/include/libcamera/internal/dma_buf_allocator.h
> index 13600915..c22b9bbd 100644
> --- a/include/libcamera/internal/dma_buf_allocator.h
> +++ b/include/libcamera/internal/dma_buf_allocator.h
> @@ -11,6 +11,7 @@
>  #include <stdint.h>
>  #include <string>
>  #include <vector>
> +#include <cstdint>

This file already includes stdint.h, which should provide a definition
for uint64_t. Does it really fail to compile ?

>  
>  #include <libcamera/base/flags.h>
>  #include <libcamera/base/shared_fd.h>
THO DAT NGUYEN/LGEDV ADVANCED PLATFORM TEAM March 28, 2025, 11:31 p.m. UTC | #2
Thank you! I used v0.4.0 and didnt check carefully at master.
Please ignore my patch

Best regards
Tho

Tải xuống Outlook dành cho Android<https://aka.ms/AAb9ysg>

Patch
diff mbox series

diff --git a/include/libcamera/internal/dma_buf_allocator.h b/include/libcamera/internal/dma_buf_allocator.h
index 13600915..c22b9bbd 100644
--- a/include/libcamera/internal/dma_buf_allocator.h
+++ b/include/libcamera/internal/dma_buf_allocator.h
@@ -11,6 +11,7 @@ 
 #include <stdint.h>
 #include <string>
 #include <vector>
+#include <cstdint>
 
 #include <libcamera/base/flags.h>
 #include <libcamera/base/shared_fd.h>