Use a zero sized array for raw field in struct fid

The raw field's size can vary so we use a zero sized array since
gcc will not allow a variable sized array inside a union. This
has been tested with ext3 and gfs2 and relates to the bug
report: http://lkml.org/lkml/2007/10/24/374 and discussion
thread: http://lkml.org/lkml/2008/4/7/65

Signed-off-by: Steven Whitehouse <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Cc: Neil Brown <[email protected]>
Cc: Adrian Bunk <[email protected]>
Signed-off-by: J. Bruce Fields <[email protected]>
This commit is contained in:
Steven Whitehouse authored and J. Bruce Fields committed 2008-04-23 16:13:42 -04:00
1 parent ff7d9756b5
commit 9078dc0814
1 file changed
+1 -1
+1 -1
View File
@@ -43,7 +43,7 @@ struct fid {
u32 parent_ino;
u32 parent_gen;
} i32;
__u32 raw[6];
__u32 raw[0];
};
};