From 1f43b52117fc97eef95e3627517cadb531b2b43e Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Thu, 13 Jun 2019 16:38:54 +0200 Subject: tests: Fix the glob test on musl libc Fixes #150 Signed-off-by: Andreas Schneider --- tests/unittests/torture_config.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/unittests/torture_config.c b/tests/unittests/torture_config.c index 95f135e7..f5bf37d0 100644 --- a/tests/unittests/torture_config.c +++ b/tests/unittests/torture_config.c @@ -300,16 +300,16 @@ static void torture_config_double_ports(void **state) { static void torture_config_glob(void **state) { ssh_session session = *state; int ret; -#ifdef HAVE_GLOB +#if defined(HAVE_GLOB) && defined(HAVE_GLOB_GL_FLAGS_MEMBER) char *v; -#endif +#endif /* HAVE_GLOB && HAVE_GLOB_GL_FLAGS_MEMBER */ ret = ssh_config_parse_file(session, LIBSSH_TESTCONFIG5); assert_true(ret == 0); /* non-existing files should not error */ /* Test the variable presence */ -#ifdef HAVE_GLOB +#if defined(HAVE_GLOB) && defined(HAVE_GLOB_GL_FLAGS_MEMBER) ret = ssh_options_get(session, SSH_OPTIONS_PROXYCOMMAND, &v); assert_true(ret == 0); assert_non_null(v); @@ -323,7 +323,7 @@ static void torture_config_glob(void **state) { assert_string_equal(v, ID_FILE); SSH_STRING_FREE_CHAR(v); -#endif /* HAVE_GLOB */ +#endif /* HAVE_GLOB && HAVE_GLOB_GL_FLAGS_MEMBER */ } /** -- cgit v1.2.3