summaryrefslogtreecommitdiff
path: root/test/argp/argp-ex4.c
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@uclibc-ng.org>2016-11-03 20:19:02 +0100
committerWaldemar Brodkorb <wbx@uclibc-ng.org>2016-11-03 20:19:02 +0100
commit24b4b8b66366176b40525baa1b2f056e8a68d0ce (patch)
treec705733ff04ff1d089eff6494622668632565a62 /test/argp/argp-ex4.c
parent3384c45e66ddf18f235654b67ae34ac7dcb07534 (diff)
argp: be sure uClibc-ng feature is available
Diffstat (limited to 'test/argp/argp-ex4.c')
-rw-r--r--test/argp/argp-ex4.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/argp/argp-ex4.c b/test/argp/argp-ex4.c
index c77c7ef..97097c7 100644
--- a/test/argp/argp-ex4.c
+++ b/test/argp/argp-ex4.c
@@ -25,6 +25,7 @@
#include <stdlib.h>
#include <error.h>
+#if (defined(__GLIBC__) && !defined(__UCLIBC__)) || defined(__UCLIBC_HAS_ARGP__)
#include <argp.h>
const char *argp_program_version =
@@ -130,9 +131,11 @@ parse_opt (int key, char *arg, struct argp_state *state)
/* Our argp parser. */
static struct argp argp = { options, parse_opt, args_doc, doc };
+#endif
int main (int argc, char **argv)
{
+#if (defined(__GLIBC__) && !defined(__UCLIBC__)) || defined(__UCLIBC_HAS_ARGP__)
int i, j;
struct arguments arguments;
@@ -164,4 +167,7 @@ int main (int argc, char **argv)
}
exit (0);
+#else
+ return 23;
+#endif
}