[libcamera-devel] [PATCH] utils: ipu3: Include libgen.h for basename()
Umang Jain
umang.jain at ideasonboard.com
Fri Dec 2 14:33:37 CET 2022
Hello,
Thank you for the patch
On 12/2/22 9:27 PM, Jacopo Mondi via libcamera-devel wrote:
> The "basename" function from the standard C library is defined in the
> libgen.h header.
>
> Include it to avoid errors triggered by -Wimplicit-function-declaration
>
> ../utils/ipu3/ipu3-pack.c:21:47: error: implicit declaration of function
> 'basename' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
>
> Signed-off-by: Jacopo Mondi <jacopo at jmondi.org>
Reviewed-by: Umang Jain <umang.jain at ideasonboard.com>
> ---
> utils/ipu3/ipu3-pack.c | 1 +
> utils/ipu3/ipu3-unpack.c | 1 +
> 2 files changed, 2 insertions(+)
>
> diff --git a/utils/ipu3/ipu3-pack.c b/utils/ipu3/ipu3-pack.c
> index decbfc6c397a..27af44068956 100644
> --- a/utils/ipu3/ipu3-pack.c
> +++ b/utils/ipu3/ipu3-pack.c
> @@ -8,6 +8,7 @@
>
> #include <errno.h>
> #include <fcntl.h>
> +#include <libgen.h>
> #include <stdint.h>
> #include <stdio.h>
> #include <string.h>
> diff --git a/utils/ipu3/ipu3-unpack.c b/utils/ipu3/ipu3-unpack.c
> index 9d2c1200d932..aa67e0b0ecf5 100644
> --- a/utils/ipu3/ipu3-unpack.c
> +++ b/utils/ipu3/ipu3-unpack.c
> @@ -8,6 +8,7 @@
>
> #include <errno.h>
> #include <fcntl.h>
> +#include <libgen.h>
> #include <stdint.h>
> #include <stdio.h>
> #include <string.h>
More information about the libcamera-devel
mailing list