[PATCH] Fix compilation issue when libuargp is compiled without __UCLIBC_HAS_PROGRAM_INVOCATION_NAME__

This fixes the issue reported at https://github.com/wbx-github/uclibc-ng/issues/2 Signed-off-by: Yann Sionneau <yann@sionneau.net> --- libuargp/argp-parse.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libuargp/argp-parse.c b/libuargp/argp-parse.c index ecd5e7eb6..030bc4f9f 100644 --- a/libuargp/argp-parse.c +++ b/libuargp/argp-parse.c @@ -112,7 +112,7 @@ argp_default_parser (int key, char *arg, struct argp_state *state) break; case OPT_PROGNAME: /* Set the program name. */ -#if defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_NAME +#if defined _LIBC && defined(__UCLIBC_HAS_PROGRAM_INVOCATION_NAME__) program_invocation_name = arg; #endif /* [Note that some systems only have PROGRAM_INVOCATION_SHORT_NAME (aka @@ -126,7 +126,7 @@ argp_default_parser (int key, char *arg, struct argp_state *state) else state->name = arg; -#if defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME +#if defined _LIBC && defined(__UCLIBC_HAS_PROGRAM_INVOCATION_NAME__) program_invocation_short_name = state->name; #endif -- 2.17.1

Hi, thanks, applied and pushed, Waldemar Yann Sionneau wrote,
This fixes the issue reported at https://github.com/wbx-github/uclibc-ng/issues/2
Signed-off-by: Yann Sionneau <yann@sionneau.net> --- libuargp/argp-parse.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libuargp/argp-parse.c b/libuargp/argp-parse.c index ecd5e7eb6..030bc4f9f 100644 --- a/libuargp/argp-parse.c +++ b/libuargp/argp-parse.c @@ -112,7 +112,7 @@ argp_default_parser (int key, char *arg, struct argp_state *state) break;
case OPT_PROGNAME: /* Set the program name. */ -#if defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_NAME +#if defined _LIBC && defined(__UCLIBC_HAS_PROGRAM_INVOCATION_NAME__) program_invocation_name = arg; #endif /* [Note that some systems only have PROGRAM_INVOCATION_SHORT_NAME (aka @@ -126,7 +126,7 @@ argp_default_parser (int key, char *arg, struct argp_state *state) else state->name = arg;
-#if defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME +#if defined _LIBC && defined(__UCLIBC_HAS_PROGRAM_INVOCATION_NAME__) program_invocation_short_name = state->name; #endif
-- 2.17.1
_______________________________________________ devel mailing list devel@uclibc-ng.org https://mailman.uclibc-ng.org/cgi-bin/mailman/listinfo/devel
participants (2)
-
Waldemar Brodkorb
-
Yann Sionneau