dnl and various less common threadsafe functions
AC_CHECK_FUNCS_ONCE([cfmakeraw geteuid getgid getgrnam_r getmntent_r \
getpwuid_r getuid initgroups kill mmap newlocale posix_fallocate \
- posix_memalign regexec sched_getaffinity setns])
+ posix_memalign regexec sched_getaffinity setns symlink])
dnl Availability of pthread functions (if missing, win32 threading is
dnl assumed). Because of $LIB_PTHREAD, we cannot use AC_CHECK_FUNCS_ONCE.
if (virCommandRun(cmd, NULL) < 0)
goto skip;
+#ifdef HAVE_SYMLINK
/* Create some symlinks in a sub-directory. */
if (symlink("../qcow2", datadir "/sub/link1") < 0 ||
symlink("../wrap", datadir "/sub/link2") < 0) {
fprintf(stderr, "unable to create symlink");
goto cleanup;
}
+#endif
ret = 0;
cleanup:
canonraw, absraw, datadir, VIR_STORAGE_FILE_RAW,
true, 1024, false,
};
+#if HAVE_SYMLINK
const testFileData link1_rel = {
canonraw, "../raw", "sub/../sub/..", VIR_STORAGE_FILE_RAW,
true, 1024, false,
canonqcow2, "../sub/link1", datadir "/sub/../sub",
VIR_STORAGE_FILE_QCOW2, true, 1024, false,
};
+#endif
/* The actual tests, in several groups. */
chain12a, EXP_PASS,
chain12b, ALLOW_PROBE | EXP_PASS);
+#ifdef HAVE_SYMLINK
/* Rewrite qcow2 and wrap file to use backing names relative to a
* symlink from a different directory */
virCommandFree(cmd);
chain13a, ALLOW_PROBE | EXP_PASS,
chain13c, EXP_PASS,
chain13c, ALLOW_PROBE | EXP_PASS);
+#endif
/* Final cleanup */
testCleanupImages();