[libcamera-devel] libcamera: formats: Add missing include

Message ID 20190619144917.8854-1-jacopo@jmondi.org
State Accepted
Commit d78fbdba8712de8389940180ab0b391da2cbe0b9
Headers show
Series
  • [libcamera-devel] libcamera: formats: Add missing include
Related show

Commit Message

Jacopo Mondi June 19, 2019, 2:49 p.m. UTC
Include errno.h header to fix missing definition of -EEXIST error code:
src/libcamera/formats.cpp:43:11: error: use of undeclared identifier 'EEXIST'

Fixes: 1cf709b1d2bb ("libcamera: formats: Add ImageFormats")
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
---
 src/libcamera/formats.cpp | 2 ++
 1 file changed, 2 insertions(+)

Comments

Laurent Pinchart June 19, 2019, 2:48 p.m. UTC | #1
Hi Jacpo,

Thank you for the patch.

On Wed, Jun 19, 2019 at 04:49:17PM +0200, Jacopo Mondi wrote:
> Include errno.h header to fix missing definition of -EEXIST error code:
> src/libcamera/formats.cpp:43:11: error: use of undeclared identifier 'EEXIST'
> 
> Fixes: 1cf709b1d2bb ("libcamera: formats: Add ImageFormats")
> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
>  src/libcamera/formats.cpp | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/src/libcamera/formats.cpp b/src/libcamera/formats.cpp
> index f1a62d47e678..ee4572e01332 100644
> --- a/src/libcamera/formats.cpp
> +++ b/src/libcamera/formats.cpp
> @@ -7,6 +7,8 @@
>  
>  #include "formats.h"
>  
> +#include <errno.h>
> +
>  /**
>   * \file formats.h
>   * \brief Types and helper methods to handle libcamera image formats
Niklas Söderlund June 19, 2019, 2:52 p.m. UTC | #2
Hi Jacopo,

Thanks for finding this. It's my fault, I wonder why gcc did not warn 
about this. In any case sorry for the mess.

On 2019-06-19 16:49:17 +0200, Jacopo Mondi wrote:
> Include errno.h header to fix missing definition of -EEXIST error code:
> src/libcamera/formats.cpp:43:11: error: use of undeclared identifier 'EEXIST'
> 
> Fixes: 1cf709b1d2bb ("libcamera: formats: Add ImageFormats")
> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>

Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>

> ---
>  src/libcamera/formats.cpp | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/src/libcamera/formats.cpp b/src/libcamera/formats.cpp
> index f1a62d47e678..ee4572e01332 100644
> --- a/src/libcamera/formats.cpp
> +++ b/src/libcamera/formats.cpp
> @@ -7,6 +7,8 @@
>  
>  #include "formats.h"
>  
> +#include <errno.h>
> +
>  /**
>   * \file formats.h
>   * \brief Types and helper methods to handle libcamera image formats
> -- 
> 2.21.0
> 
> _______________________________________________
> libcamera-devel mailing list
> libcamera-devel@lists.libcamera.org
> https://lists.libcamera.org/listinfo/libcamera-devel

Patch

diff --git a/src/libcamera/formats.cpp b/src/libcamera/formats.cpp
index f1a62d47e678..ee4572e01332 100644
--- a/src/libcamera/formats.cpp
+++ b/src/libcamera/formats.cpp
@@ -7,6 +7,8 @@ 
 
 #include "formats.h"
 
+#include <errno.h>
+
 /**
  * \file formats.h
  * \brief Types and helper methods to handle libcamera image formats