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
Notes: sideshowbarker 2024-07-18 11:19:58 +09:00

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;
}
};