diff mbox series

[uclibc-ng-devel] Fix compilation issue when libuargp is compiled without __UCLIBC_HAS_PROGRAM_INVOCATION_NAME__

Message ID 20190616130642.7119-1-yann@sionneau.net
State Accepted
Headers show
Series [uclibc-ng-devel] Fix compilation issue when libuargp is compiled without __UCLIBC_HAS_PROGRAM_INVOCATION_NAME__ | expand

Commit Message

Yann Sionneau June 16, 2019, 1:06 p.m. UTC
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(-)

Comments

Waldemar Brodkorb June 21, 2019, 10:14 a.m. UTC | #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
diff mbox series

Patch

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