We now compile on systems where ENOTSUP is not defined.
authorWayne Davison <wayned@samba.org>
Sun, 11 Mar 2007 07:21:07 +0000 (07:21 +0000)
committerWayne Davison <wayned@samba.org>
Sun, 11 Mar 2007 07:21:07 +0000 (07:21 +0000)
acls.c
lib/sysacls.h

diff --git a/acls.c b/acls.c
index 36d6ba2..98d4c8f 100644 (file)
--- a/acls.c
+++ b/acls.c
@@ -510,7 +510,7 @@ static int get_rsync_acl(const char *fname, rsync_acl *racl,
                if (!ok) {
                        return -1;
                }
-       } else if (errno == ENOTSUP || errno == ENOSYS) {
+       } else if (no_acl_syscall_error(errno)) {
                /* ACLs are not supported, so pretend we have a basic ACL. */
                if (type == SMB_ACL_TYPE_ACCESS)
                        rsync_acl_fake_perms(racl, mode);
@@ -1043,7 +1043,9 @@ int default_perms_for_dir(const char *dir)
        if (sacl == NULL) {
                /* Couldn't get an ACL.  Darn. */
                switch (errno) {
+#ifdef ENOTSUP
                case ENOTSUP:
+#endif
                case ENOSYS:
                        /* No ACLs are available. */
                        break;
index ce643ad..be986f7 100644 (file)
@@ -36,5 +36,6 @@ int sys_acl_delete_def_file(const char *name);
 int sys_acl_free_text(char *text);
 int sys_acl_free_acl(SMB_ACL_T the_acl);
 int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype);
+int no_acl_syscall_error(int err);
 
 #endif /* SUPPORT_ACLS */