Subject: bug#20979: ../lib/set-permissions.c:288:27: error: 'mode' undeclared

From: John David Anglin <[email-masked]>
Date: Sat, 4 Jul 2015 11:32:30 -0400

The following error occurs building coreutils-8.24 on hppa2.0w-hp-hpux11.11 with gcc-5:

  CC       lib/set-permissions.o../lib/set-permissions.c: In function 'context_acl_from_mode':
../lib/set-permissions.c:288:27: error: 'mode' undeclared (first use in this function)
   ctx->entries[0].mode = (mode >> 6) & 7;
                           ^
../lib/set-permissions.c:288:27: note: each undeclared identifier is reported on
ly once for each function it appears in
../lib/set-permissions.c: In function 'context_aclv_from_mode':
../lib/set-permissions.c:307:34: error: 'mode' undeclared (first use in this fun
ction)
   ctx->aclv_entries[0].a_perm = (mode >> 6) & 7;
                                  ^
../lib/set-permissions.c:319:26: error: 'entries' undeclared (first use in this 
function)
   ret = aclsort (sizeof (entries) / sizeof (struct acl), 1, entries);
                          ^
../lib/set-permissions.c: In function 'set_acls':
../lib/set-permissions.c:660:69: error: 'source_statbuf' undeclared (first use in this function)
        && (from_mode || !acl_nontrivial (ctx->count, ctx->entries, &source_statbuf)))
                                                                     ^
../lib/set-permissions.c:660:26: error: too many arguments to function 'acl_nontrivial'
        && (from_mode || !acl_nontrivial (ctx->count, ctx->entries, &source_statbuf)))
                          ^
In file included from ../lib/set-permissions.c:24:0:
../lib/acl-internal.h:215:12: note: declared here
 extern int acl_nontrivial (int count, struct acl_entry *entries);
            ^
make[2]: *** [lib/set-permissions.o] Error 1
make[2]: Leaving directory `/xxx/gnu/coreutils-8.24/objdir'
make[1]: *** [all-recursive] Error 1

Dave
--
John David Anglin	[email-masked]