aboutsummaryrefslogtreecommitdiffstats
path: root/main/libssh/fix-unittests-torture_config.patch
blob: ba133856602ae188a1c119ef34175fb7f115de48 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
Has been fixed in master with https://bugs.libssh.org/rLIBSSH1f43b52117fc97eef95e3627517cadb531b2b43e

Can be removed as of next release (0.8.7+)

--- a/tests/unittests/torture_config.c
+++ b/tests/unittests/torture_config.c
@@ -208,16 +208,16 @@
 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);
@@ -231,7 +231,7 @@
 
     assert_string_equal(v, ID_FILE);
     SSH_STRING_FREE_CHAR(v);
-#endif /* HAVE_GLOB */
+#endif /* HAVE_GLOB && HAVE_GLOB_GL_FLAGS_MEMBER */
 }
 
 /**