]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Dummy out copy_acls if sys/acl.h is missing or ACL support is disabled.
authorJoerg Sonnenberger <joerg@bec.de>
Tue, 21 Jun 2016 16:29:07 +0000 (18:29 +0200)
committerJoerg Sonnenberger <joerg@bec.de>
Tue, 21 Jun 2016 16:29:07 +0000 (18:29 +0200)
libarchive/archive_write_disk_posix.c

index 6737cd755b226f7a06b69f637bba3da3648dcb37..67aacf15a004649576056bcae31fd3f113f33017 100644 (file)
@@ -3487,6 +3487,9 @@ exit_xattr:
 static int
 copy_acls(struct archive_write_disk *a, int tmpfd, int dffd)
 {
+#ifndef HAVE_SYS_ACL_H
+       return 0;
+#else
        acl_t acl, dfacl = NULL;
        int acl_r, ret = ARCHIVE_OK;
 
@@ -3514,6 +3517,7 @@ exit_acl:
        if (dfacl)
                acl_free(dfacl);
        return (ret);
+#endif
 }
 
 static int