diff --git a/src/add-ons/kernel/file_systems/bfs/bfs.h b/src/add-ons/kernel/file_systems/bfs/bfs.h index 37c812666b..f7cdc00c16 100644 --- a/src/add-ons/kernel/file_systems/bfs/bfs.h +++ b/src/add-ons/kernel/file_systems/bfs/bfs.h @@ -134,11 +134,12 @@ struct small_data { uint16 name_size; uint16 data_size; - #if __MWERKS__ - char name[1]; // name_size long, followed by data - #else - char name[0]; // name_size long, followed by data - #endif +#if __MWERKS__ + char name[1]; // name_size long, followed by data + // ToDo: this is bad and breaks the code +#else + char name[0]; // name_size long, followed by data +#endif uint32 Type() const { return BFS_ENDIAN_TO_HOST_INT32(type); } uint16 NameSize() const { return BFS_ENDIAN_TO_HOST_INT16(name_size); } @@ -184,7 +185,13 @@ struct bfs_inode { char short_symlink[SHORT_SYMLINK_NAME_LENGTH]; }; int32 pad[4]; + +#if __MWERKS__ small_data small_data_start[1]; + // ToDo: this reduces the space you have in an inode for attributes +#else + small_data small_data_start[0]; +#endif int32 Magic1() const { return BFS_ENDIAN_TO_HOST_INT32(magic1); } int32 UserID() const { return BFS_ENDIAN_TO_HOST_INT32(uid); }