# generic build dependencies
-if host_machine.system() == 'linux' and cc.has_header('sys/acl.h')
- acl_dep = cc.find_library('acl', required: false)
- conf.set('WITH_SYS_ACL_H', 1)
-else
- acl_dep = dependency('', required: false)
+acl_dep = cc.find_library('acl', required: false)
+if acl_dep.found()
+ conf.set('WITH_LIBACL', 1)
endif
apparmor_dep = dependency('libapparmor', required: get_option('apparmor'))
switch (ns) {
case QEMU_DOMAIN_NS_MOUNT:
-# if !defined(WITH_SYS_ACL_H) || !defined(WITH_SELINUX)
+# if !defined(WITH_LIBACL) || !defined(WITH_SELINUX)
/* We can't create the exact copy of paths if either of
* these is not available. */
return false;
#if WITH_SYS_SYSCALL_H
# include <sys/syscall.h>
#endif
-#if WITH_SYS_ACL_H
+#if WITH_LIBACL
# include <sys/acl.h>
#endif
#include <sys/file.h>
#endif /* !defined(__linux__) || !defined(WITH_SYS_MOUNT_H) */
-#if defined(WITH_SYS_ACL_H)
+#if defined(WITH_LIBACL)
int
virFileGetACLs(const char *file,
void **acl)
*acl = NULL;
}
-#else /* !defined(WITH_SYS_ACL_H) */
+#else /* !defined(WITH_LIBACL) */
int
virFileGetACLs(const char *file G_GNUC_UNUSED,
*acl = NULL;
}
-#endif /* !defined(WITH_SYS_ACL_H) */
+#endif /* !defined(WITH_LIBACL) */
int
virFileCopyACLs(const char *src,