diff options
author | Gunnar Beutner <gbeutner@serenityos.org> | 2021-06-29 14:03:48 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-06-29 20:03:36 +0200 |
commit | 1d4ae9194ede91cf490ff093ef378c749f06dee3 (patch) | |
tree | 6a893f6de0106dde31681cbe9c1cd98ca4d29f4b /Userland/Libraries/LibC/dirent.cpp | |
parent | 90e3aa35efa09aff3ce48112f886de1e1091af3f (diff) | |
download | serenity-1d4ae9194ede91cf490ff093ef378c749f06dee3.zip |
LibC: Fix struct layout for sys_dirent on x86_64
Diffstat (limited to 'Userland/Libraries/LibC/dirent.cpp')
-rw-r--r-- | Userland/Libraries/LibC/dirent.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibC/dirent.cpp b/Userland/Libraries/LibC/dirent.cpp index 81e6329c16..f0f3fb1b78 100644 --- a/Userland/Libraries/LibC/dirent.cpp +++ b/Userland/Libraries/LibC/dirent.cpp @@ -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; } }; |