ipu3: Use posix basename
musl does not implement GNU basename extention and with latest musl the prototype from string.h is also removed [1] which now results in compile errors e.g. ../git/utils/ipu3/ipu3-pack.c:21:47: error: call to undeclared function 'basename'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] These utilities are using this function in usage() which is used just before program exit. Always use the basename APIs from libgen.h which is posix implementation [1] https://git.musl-libc.org/cgit/musl/commit/?id=725e17ed6dff4d0cd22487bb64470881e86a92e7 Signed-off-by: Khem Raj <raj.khem@gmail.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
parent
b2ef255295
commit
f4d416db91
2 changed files with 4 additions and 3 deletions
|
@ -8,6 +8,7 @@
|
||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
#include <libgen.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
@ -15,9 +16,8 @@
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
static void usage(const char *argv0)
|
static void usage(char *argv0)
|
||||||
{
|
{
|
||||||
|
|
||||||
printf("Usage: %s input-file output-file\n", basename(argv0));
|
printf("Usage: %s input-file output-file\n", basename(argv0));
|
||||||
printf("Convert unpacked RAW10 Bayer data to the IPU3 packed Bayer formats\n");
|
printf("Convert unpacked RAW10 Bayer data to the IPU3 packed Bayer formats\n");
|
||||||
printf("If the output-file '-', output data will be written to standard output\n");
|
printf("If the output-file '-', output data will be written to standard output\n");
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
#include <libgen.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
@ -15,7 +16,7 @@
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
static void usage(const char *argv0)
|
static void usage(char *argv0)
|
||||||
{
|
{
|
||||||
printf("Usage: %s input-file output-file\n", basename(argv0));
|
printf("Usage: %s input-file output-file\n", basename(argv0));
|
||||||
printf("Unpack the IPU3 raw Bayer format to 16-bit Bayer\n");
|
printf("Unpack the IPU3 raw Bayer format to 16-bit Bayer\n");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue