summaryrefslogtreecommitdiff
path: root/test/argp/bug-argp1.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/bug-argp1.c
parent3384c45e66ddf18f235654b67ae34ac7dcb07534 (diff)
argp: be sure uClibc-ng feature is available
Diffstat (limited to 'test/argp/bug-argp1.c')
-rw-r--r--test/argp/bug-argp1.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/argp/bug-argp1.c b/test/argp/bug-argp1.c
index a28cf4b..39b573d 100644
--- a/test/argp/bug-argp1.c
+++ b/test/argp/bug-argp1.c
@@ -1,6 +1,6 @@
+#if (defined(__GLIBC__) && !defined(__UCLIBC__)) || defined(__UCLIBC_HAS_ARGP__)
#include <argp.h>
-
static const struct argp_option test_options[] =
{
{ NULL, 'a', NULL, OPTION_DOC, NULL },
@@ -13,13 +13,18 @@ static struct argp test_argp =
test_options
};
+#endif
static int
do_test (int argc, char *argv[])
{
+#if (defined(__GLIBC__) && !defined(__UCLIBC__)) || defined(__UCLIBC_HAS_ARGP__)
int i;
argp_parse (&test_argp, argc, argv, 0, &i, NULL);
return 0;
+#else
+ return 23;
+#endif
}
#define TEST_FUNCTION do_test (argc, argv)