summaryrefslogtreecommitdiff
path: root/libuargp/argp-parse.c
diff options
context:
space:
mode:
authorYann Sionneau <yann@sionneau.net>2019-06-16 15:06:42 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2019-06-21 12:09:27 +0200
commitf93b43e4d1a02b72e8e7659f6be4cc28a0c6e194 (patch)
tree0caa2c9779c962df2177ebd795bc7d23c394b8d5 /libuargp/argp-parse.c
parent785dee78552f9ad06819bf7eb1adc05b43110842 (diff)
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>
Diffstat (limited to 'libuargp/argp-parse.c')
-rw-r--r--libuargp/argp-parse.c4
1 files 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