1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 17:37:34 +00:00

LibC: Fix struct layout for sys_dirent on x86_64

This commit is contained in:
Gunnar Beutner 2021-06-29 14:03:48 +02:00 committed by Andreas Kling
parent 90e3aa35ef
commit 1d4ae9194e

View file

@ -57,11 +57,11 @@ void rewinddir(DIR* dirp)
struct [[gnu::packed]] sys_dirent {
ino_t ino;
u8 file_type;
size_t namelen;
u32 namelen;
char name[];
size_t total_size()
{
return sizeof(ino_t) + sizeof(u8) + sizeof(size_t) + sizeof(char) * namelen;
return sizeof(ino_t) + sizeof(u8) + sizeof(u32) + sizeof(char) * namelen;
}
};