libcamera: Add missing direct includes
diff mbox series

Message ID 20261005114432.321940-1-denys.f@collabora.com
State Accepted
Headers show
Series
  • libcamera: Add missing direct includes
Related show

Commit Message

Denys Fedoryshchenko Oct. 5, 2026, 11:44 a.m. UTC
Building with libc++ 22 and -D_LIBCPP_REMOVE_TRANSITIVE_INCLUDES=1
exposes missing includes.

Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
---

Tested with Clang/libc++ 22 and Ubuntu host C headers, retaining -Werror.

 include/libcamera/internal/delayed_controls.h | 1 +
 include/libcamera/internal/process.h          | 1 +
 test/controls/control_value.cpp               | 1 +
 test/file.cpp                                 | 1 +
 test/serialization/serialization_test.cpp     | 1 +
 5 files changed, 5 insertions(+)

Comments

Barnabás Pőcze Oct. 5, 2026, 3:27 p.m. UTC | #1
2026. 10. 05. 13:44 keltezéssel, Denys Fedoryshchenko írta:
> Building with libc++ 22 and -D_LIBCPP_REMOVE_TRANSITIVE_INCLUDES=1
> exposes missing includes.
> 
> Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
> ---
> 
> Tested with Clang/libc++ 22 and Ubuntu host C headers, retaining -Werror.

Have you built every component? Or were there some e.g. IPA modules that were omitted?

In any case, the changes look ok to me.

Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>


> 
>   include/libcamera/internal/delayed_controls.h | 1 +
>   include/libcamera/internal/process.h          | 1 +
>   test/controls/control_value.cpp               | 1 +
>   test/file.cpp                                 | 1 +
>   test/serialization/serialization_test.cpp     | 1 +
>   5 files changed, 5 insertions(+)
> 
> diff --git a/include/libcamera/internal/delayed_controls.h b/include/libcamera/internal/delayed_controls.h
> index b64d8bba7cf73e10491d13d64bb4b3f7db80681b..692b8ed9b0e90bde535a2577aabea1bd75d7ee09 100644
> --- a/include/libcamera/internal/delayed_controls.h
> +++ b/include/libcamera/internal/delayed_controls.h
> @@ -7,6 +7,7 @@
> 
>   #pragma once
> 
> +#include <array>
>   #include <stdint.h>
>   #include <unordered_map>
> 
> diff --git a/include/libcamera/internal/process.h b/include/libcamera/internal/process.h
> index 596e967de884852da885238a364b72764409df1b..0dfc2a55b477f5493dce987688cdf056b4bb0f73 100644
> --- a/include/libcamera/internal/process.h
> +++ b/include/libcamera/internal/process.h
> @@ -9,6 +9,7 @@
> 
>   #include <span>
>   #include <string>
> +#include <sys/types.h>
> 
>   #include <libcamera/base/class.h>
>   #include <libcamera/base/signal.h>
> diff --git a/test/controls/control_value.cpp b/test/controls/control_value.cpp
> index c2f9fc482638392334cbc3e0e4503076e126e982..139701f7edbefb2a219a59b25076b007cad13397 100644
> --- a/test/controls/control_value.cpp
> +++ b/test/controls/control_value.cpp
> @@ -6,6 +6,7 @@
>    */
> 
>   #include <algorithm>
> +#include <array>
>   #include <iostream>
> 
>   #include <libcamera/controls.h>
> diff --git a/test/file.cpp b/test/file.cpp
> index 9bf67cc4a92a33505df6a22f0c3fa643e9ad435e..dfb5e63bea35f0f5d5980d17a0281342d06cc857 100644
> --- a/test/file.cpp
> +++ b/test/file.cpp
> @@ -5,6 +5,7 @@
>    * File I/O operations tests
>    */
> 
> +#include <array>
>   #include <fstream>
>   #include <iostream>
>   #include <stdlib.h>
> diff --git a/test/serialization/serialization_test.cpp b/test/serialization/serialization_test.cpp
> index af9969fdd11ff821de104b98b013acb891d2a8c8..f0850c98e07ad2ebdc31ae61241f8c590ae00570 100644
> --- a/test/serialization/serialization_test.cpp
> +++ b/test/serialization/serialization_test.cpp
> @@ -9,6 +9,7 @@
> 
>   #include <algorithm>
>   #include <iostream>
> +#include <iterator>
>   #include <map>
> 
>   #include <libcamera/camera.h>
Kieran Bingham Oct. 7, 2026, 12:31 p.m. UTC | #2
Quoting Barnabás Pőcze (2026-10-05 16:27:01)
> 2026. 10. 05. 13:44 keltezéssel, Denys Fedoryshchenko írta:
> > Building with libc++ 22 and -D_LIBCPP_REMOVE_TRANSITIVE_INCLUDES=1
> > exposes missing includes.
> > 
> > Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
> > ---
> > 
> > Tested with Clang/libc++ 22 and Ubuntu host C headers, retaining -Werror.
> 
> Have you built every component? Or were there some e.g. IPA modules that were omitted?
> 
> In any case, the changes look ok to me.

And me, and checkstyle is clean so:

Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>

> 
> Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
> 
> 
> > 
> >   include/libcamera/internal/delayed_controls.h | 1 +
> >   include/libcamera/internal/process.h          | 1 +
> >   test/controls/control_value.cpp               | 1 +
> >   test/file.cpp                                 | 1 +
> >   test/serialization/serialization_test.cpp     | 1 +
> >   5 files changed, 5 insertions(+)
> > 
> > diff --git a/include/libcamera/internal/delayed_controls.h b/include/libcamera/internal/delayed_controls.h
> > index b64d8bba7cf73e10491d13d64bb4b3f7db80681b..692b8ed9b0e90bde535a2577aabea1bd75d7ee09 100644
> > --- a/include/libcamera/internal/delayed_controls.h
> > +++ b/include/libcamera/internal/delayed_controls.h
> > @@ -7,6 +7,7 @@
> > 
> >   #pragma once
> > 
> > +#include <array>
> >   #include <stdint.h>
> >   #include <unordered_map>
> > 
> > diff --git a/include/libcamera/internal/process.h b/include/libcamera/internal/process.h
> > index 596e967de884852da885238a364b72764409df1b..0dfc2a55b477f5493dce987688cdf056b4bb0f73 100644
> > --- a/include/libcamera/internal/process.h
> > +++ b/include/libcamera/internal/process.h
> > @@ -9,6 +9,7 @@
> > 
> >   #include <span>
> >   #include <string>
> > +#include <sys/types.h>
> > 
> >   #include <libcamera/base/class.h>
> >   #include <libcamera/base/signal.h>
> > diff --git a/test/controls/control_value.cpp b/test/controls/control_value.cpp
> > index c2f9fc482638392334cbc3e0e4503076e126e982..139701f7edbefb2a219a59b25076b007cad13397 100644
> > --- a/test/controls/control_value.cpp
> > +++ b/test/controls/control_value.cpp
> > @@ -6,6 +6,7 @@
> >    */
> > 
> >   #include <algorithm>
> > +#include <array>
> >   #include <iostream>
> > 
> >   #include <libcamera/controls.h>
> > diff --git a/test/file.cpp b/test/file.cpp
> > index 9bf67cc4a92a33505df6a22f0c3fa643e9ad435e..dfb5e63bea35f0f5d5980d17a0281342d06cc857 100644
> > --- a/test/file.cpp
> > +++ b/test/file.cpp
> > @@ -5,6 +5,7 @@
> >    * File I/O operations tests
> >    */
> > 
> > +#include <array>
> >   #include <fstream>
> >   #include <iostream>
> >   #include <stdlib.h>
> > diff --git a/test/serialization/serialization_test.cpp b/test/serialization/serialization_test.cpp
> > index af9969fdd11ff821de104b98b013acb891d2a8c8..f0850c98e07ad2ebdc31ae61241f8c590ae00570 100644
> > --- a/test/serialization/serialization_test.cpp
> > +++ b/test/serialization/serialization_test.cpp
> > @@ -9,6 +9,7 @@
> > 
> >   #include <algorithm>
> >   #include <iostream>
> > +#include <iterator>
> >   #include <map>
> > 
> >   #include <libcamera/camera.h>
>
Denys Fedoryshchenko Oct. 7, 2026, 12:35 p.m. UTC | #3
From: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
To: "Denys Fedoryshchenko"<denys.f@collabora.com>, <libcamera-devel@lists.libcamera.org>
Date: Mon, 05 Oct 2026 18:27:01 +0300
Subject: Re: [PATCH] libcamera: Add missing direct includes

 > 2026. 10. 05. 13:44 keltezéssel, Denys Fedoryshchenko írta:
 > > Building with libc++ 22 and -D_LIBCPP_REMOVE_TRANSITIVE_INCLUDES=1
 > > exposes missing includes.
 > > 
 > > Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
 > > ---
 > > 
 > > Tested with Clang/libc++ 22 and Ubuntu host C headers, retaining -Werror.
 > 
 > Have you built every component? Or were there some e.g. IPA modules that were omitted?

Thanks for the review!
Oops, I missed those, thanks for pointing that out!
I’ll follow up after checking the build options more thoroughly.

 > 
 > In any case, the changes look ok to me.
 > 
 > Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
 > 
 > 
 > > 
 > >   include/libcamera/internal/delayed_controls.h | 1 +
 > >   include/libcamera/internal/process.h          | 1 +
 > >   test/controls/control_value.cpp               | 1 +
 > >   test/file.cpp                                 | 1 +
 > >   test/serialization/serialization_test.cpp     | 1 +
 > >   5 files changed, 5 insertions(+)
 > > 
 > > diff --git a/include/libcamera/internal/delayed_controls.h b/include/libcamera/internal/delayed_controls.h
 > > index b64d8bba7cf73e10491d13d64bb4b3f7db80681b..692b8ed9b0e90bde535a2577aabea1bd75d7ee09 100644
 > > --- a/include/libcamera/internal/delayed_controls.h
 > > +++ b/include/libcamera/internal/delayed_controls.h
 > > @@ -7,6 +7,7 @@
 > > 
 > >   #pragma once
 > > 
 > > +#include <array>
 > >   #include <stdint.h>
 > >   #include <unordered_map>
 > > 
 > > diff --git a/include/libcamera/internal/process.h b/include/libcamera/internal/process.h
 > > index 596e967de884852da885238a364b72764409df1b..0dfc2a55b477f5493dce987688cdf056b4bb0f73 100644
 > > --- a/include/libcamera/internal/process.h
 > > +++ b/include/libcamera/internal/process.h
 > > @@ -9,6 +9,7 @@
 > > 
 > >   #include <span>
 > >   #include <string>
 > > +#include <sys/types.h>
 > > 
 > >   #include <libcamera/base/class.h>
 > >   #include <libcamera/base/signal.h>
 > > diff --git a/test/controls/control_value.cpp b/test/controls/control_value.cpp
 > > index c2f9fc482638392334cbc3e0e4503076e126e982..139701f7edbefb2a219a59b25076b007cad13397 100644
 > > --- a/test/controls/control_value.cpp
 > > +++ b/test/controls/control_value.cpp
 > > @@ -6,6 +6,7 @@
 > >    */
 > > 
 > >   #include <algorithm>
 > > +#include <array>
 > >   #include <iostream>
 > > 
 > >   #include <libcamera/controls.h>
 > > diff --git a/test/file.cpp b/test/file.cpp
 > > index 9bf67cc4a92a33505df6a22f0c3fa643e9ad435e..dfb5e63bea35f0f5d5980d17a0281342d06cc857 100644
 > > --- a/test/file.cpp
 > > +++ b/test/file.cpp
 > > @@ -5,6 +5,7 @@
 > >    * File I/O operations tests
 > >    */
 > > 
 > > +#include <array>
 > >   #include <fstream>
 > >   #include <iostream>
 > >   #include <stdlib.h>
 > > diff --git a/test/serialization/serialization_test.cpp b/test/serialization/serialization_test.cpp
 > > index af9969fdd11ff821de104b98b013acb891d2a8c8..f0850c98e07ad2ebdc31ae61241f8c590ae00570 100644
 > > --- a/test/serialization/serialization_test.cpp
 > > +++ b/test/serialization/serialization_test.cpp
 > > @@ -9,6 +9,7 @@
 > > 
 > >   #include <algorithm>
 > >   #include <iostream>
 > > +#include <iterator>
 > >   #include <map>
 > > 
 > >   #include <libcamera/camera.h>
 > 
 >

Patch
diff mbox series

diff --git a/include/libcamera/internal/delayed_controls.h b/include/libcamera/internal/delayed_controls.h
index b64d8bba7cf73e10491d13d64bb4b3f7db80681b..692b8ed9b0e90bde535a2577aabea1bd75d7ee09 100644
--- a/include/libcamera/internal/delayed_controls.h
+++ b/include/libcamera/internal/delayed_controls.h
@@ -7,6 +7,7 @@ 
 
 #pragma once
 
+#include <array>
 #include <stdint.h>
 #include <unordered_map>
 
diff --git a/include/libcamera/internal/process.h b/include/libcamera/internal/process.h
index 596e967de884852da885238a364b72764409df1b..0dfc2a55b477f5493dce987688cdf056b4bb0f73 100644
--- a/include/libcamera/internal/process.h
+++ b/include/libcamera/internal/process.h
@@ -9,6 +9,7 @@ 
 
 #include <span>
 #include <string>
+#include <sys/types.h>
 
 #include <libcamera/base/class.h>
 #include <libcamera/base/signal.h>
diff --git a/test/controls/control_value.cpp b/test/controls/control_value.cpp
index c2f9fc482638392334cbc3e0e4503076e126e982..139701f7edbefb2a219a59b25076b007cad13397 100644
--- a/test/controls/control_value.cpp
+++ b/test/controls/control_value.cpp
@@ -6,6 +6,7 @@ 
  */
 
 #include <algorithm>
+#include <array>
 #include <iostream>
 
 #include <libcamera/controls.h>
diff --git a/test/file.cpp b/test/file.cpp
index 9bf67cc4a92a33505df6a22f0c3fa643e9ad435e..dfb5e63bea35f0f5d5980d17a0281342d06cc857 100644
--- a/test/file.cpp
+++ b/test/file.cpp
@@ -5,6 +5,7 @@ 
  * File I/O operations tests
  */
 
+#include <array>
 #include <fstream>
 #include <iostream>
 #include <stdlib.h>
diff --git a/test/serialization/serialization_test.cpp b/test/serialization/serialization_test.cpp
index af9969fdd11ff821de104b98b013acb891d2a8c8..f0850c98e07ad2ebdc31ae61241f8c590ae00570 100644
--- a/test/serialization/serialization_test.cpp
+++ b/test/serialization/serialization_test.cpp
@@ -9,6 +9,7 @@ 
 
 #include <algorithm>
 #include <iostream>
+#include <iterator>
 #include <map>
 
 #include <libcamera/camera.h>