[05/10] v4l2: v4l2_compat: Include missing headers
diff mbox series

Message ID 20240624192941.22943-6-laurent.pinchart@ideasonboard.com
State Accepted
Headers show
Series
  • libcamera: Enable -Wmissing-declarations
Related show

Commit Message

Laurent Pinchart June 24, 2024, 7:29 p.m. UTC
The close() and ioctl() functions are declared in the unistd.h and
sys/ioctl.h headers. Include them to provide the declarations.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 src/v4l2/v4l2_compat.cpp | 2 ++
 1 file changed, 2 insertions(+)

Comments

Kieran Bingham June 24, 2024, 9:36 p.m. UTC | #1
Quoting Laurent Pinchart (2024-06-24 20:29:36)
> The close() and ioctl() functions are declared in the unistd.h and
> sys/ioctl.h headers. Include them to provide the declarations.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

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

> ---
>  src/v4l2/v4l2_compat.cpp | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/src/v4l2/v4l2_compat.cpp b/src/v4l2/v4l2_compat.cpp
> index 8e2b7e924dfb..9dd1577dfbde 100644
> --- a/src/v4l2/v4l2_compat.cpp
> +++ b/src/v4l2/v4l2_compat.cpp
> @@ -10,9 +10,11 @@
>  #include <errno.h>
>  #include <fcntl.h>
>  #include <stdarg.h>
> +#include <sys/ioctl.h>
>  #include <sys/mman.h>
>  #include <sys/stat.h>
>  #include <sys/types.h>
> +#include <unistd.h>
>  
>  #include <libcamera/base/utils.h>
>  
> -- 
> Regards,
> 
> Laurent Pinchart
>

Patch
diff mbox series

diff --git a/src/v4l2/v4l2_compat.cpp b/src/v4l2/v4l2_compat.cpp
index 8e2b7e924dfb..9dd1577dfbde 100644
--- a/src/v4l2/v4l2_compat.cpp
+++ b/src/v4l2/v4l2_compat.cpp
@@ -10,9 +10,11 @@ 
 #include <errno.h>
 #include <fcntl.h>
 #include <stdarg.h>
+#include <sys/ioctl.h>
 #include <sys/mman.h>
 #include <sys/stat.h>
 #include <sys/types.h>
+#include <unistd.h>
 
 #include <libcamera/base/utils.h>