Okajima-san,
We are including aufs2 in the Debian kernel for use on live CDs. We are
trying to build it for all Debian architectures, but found the following
error on alpha:
CC [M] fs/aufs/vdir.o
/build/buildd-linux-2.6_2.6.31-1-alpha-87a0KU/linux-2.6-2.6.31/debian/build/source_alpha_none/fs/aufs/vdir.c: In function 'calc_size':
/build/buildd-linux-2.6_2.6.31-1-alpha-87a0KU/linux-2.6-2.6.31/debian/build/source_alpha_none/fs/aufs/vdir.c:28: error: size of array 'type name' is negative
The code says:
BUILD_BUG_ON(sizeof(ino_t) != sizeof(long));
return ALIGN(sizeof(struct au_vdir_de) + nlen, sizeof(ino_t));
but on alpha, sizeof(ino_t) == 4 but sizeof(long) == 8.
Is it really necessary that these types have the same size? I can't see
why it would be necessary for the directory entries to be long-aligned.
If it is, perhaps we could use:
BUILD_BUG_ON(sizeof(ino_t) > sizeof(long));
return ALIGN(sizeof(struct au_vdir_de) + nlen, sizeof(long));
Ben.
--
Ben Hutchings
The generation of random numbers is too important to be left to chance.
- Robert Coveyou
Attachment:
signature.asc
Description: This is a digitally signed message part