Comment out bits of code that are only used when we *have* pid
namespaces, to avoid "unused code" warnings.
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Message-Id: <xno817tnds.fsf@greed.delorie.com>
return bufs[n];
}
+#ifdef CLONE_NEWNS
/* Like the above, but put spaces between words. Caller frees. */
static char *
concat_words (char **words, int num_words)
return rv;
}
+#endif
/* Try to mount SRC onto DEST. */
static void
/* If set, the test runs as root instead of the user running the testsuite. */
int be_su = 0;
int require_pidns = 0;
+#ifdef CLONE_NEWNS
const char *pidns_comment = NULL;
+#endif
int do_proc_mounts = 0;
int UMAP;
int GMAP;
else if (nt >= 1 && strcmp (the_words[0], "pidns") == 0)
{
require_pidns = 1;
+#ifdef CLONE_NEWNS
if (nt > 1)
pidns_comment = concat_words (the_words + 1, nt - 1);
+#endif
}
else if (nt == 3 && strcmp (the_words[0], "mkdirp") == 0)
{