btrfs: [] on the end of a struct field is a variable length array.

This throws an error in Clang, so just declare these as pointers.
This commit is contained in:
Augustin Cavalier 2017-12-12 20:09:41 -05:00
parent 361f980f9d
commit b06b5456a5

View File

@ -356,8 +356,8 @@ struct btrfs_dir_entry {
uint16 data_length;
uint16 name_length;
uint8 type;
uint8 name[];
uint8 data[]; // attribute data
uint8* name;
uint8* data; // attribute data
uint16 DataLength() const { return B_LENDIAN_TO_HOST_INT16(data_length); }
uint16 NameLength() const { return B_LENDIAN_TO_HOST_INT16(name_length); }
ino_t InodeID() const { return location.ObjectID(); }