# HG changeset patch # User Andreas Gruenbacher # Date 1432921660 -7200 # Node ID 148bf471f77288f2c48f50d5d17a215828083d7a # Parent 301a9d4b8f5a79a80c76222b07e6482798ac5a4a acl-permissions: Fix build on Solaris and Cygwin Reported by Tom G. Christensen : * lib/set-permissions.c (set_acls): The count, entries, ace_count, and ace_entries variables have moved into struct permission_context but they were still accessed as local variables here. diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2015-05-29 Andreas Gruenbacher + + acl-permissions: Fix build on Solaris and Cygwin + Reported by Tom G. Christensen : + * lib/set-permissions.c (set_acls): The count, entries, ace_count, and + ace_entries variables have moved into struct permission_context but + they were still accessed as local variables here. + 2015-05-29 Pádraig Brady linkat: avoid OS X 10.10 trailing slash with symlink bug diff --git a/lib/set-permissions.c b/lib/set-permissions.c --- a/lib/set-permissions.c +++ b/lib/set-permissions.c @@ -611,13 +611,13 @@ if (ret == 0 && ctx->count) { if (desc != -1) - ret = facl (desc, SETACL, count, entries); + ret = facl (desc, SETACL, ctx->count, ctx->entries); else - ret = acl (name, SETACL, count, entries); + ret = acl (name, SETACL, ctx->count, ctx->entries); if (ret < 0) { if ((errno == ENOSYS || errno == EOPNOTSUPP || errno == EINVAL) - && acl_nontrivial (count, entries) == 0) + && acl_nontrivial (ctx->count, ctx->entries) == 0) ret = 0; } else @@ -628,13 +628,13 @@ if (ret == 0 && ctx->ace_count) { if (desc != -1) - ret = facl (desc, ACE_SETACL, ace_count, ace_entries); + ret = facl (desc, ACE_SETACL, ctx->ace_count, ctx->ace_entries); else - ret = acl (name, ACE_SETACL, ace_count, ace_entries); + ret = acl (name, ACE_SETACL, ctx->ace_count, ctx->ace_entries); if (ret < 0) { if ((errno == ENOSYS || errno == EINVAL || errno == ENOTSUP) - && acl_ace_nontrivial (ace_count, ace_entries) == 0) + && acl_ace_nontrivial (ctx->ace_count, ctx->ace_entries) == 0) ret = 0; } else