From 1d4ae9194ede91cf490ff093ef378c749f06dee3 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Tue, 29 Jun 2021 14:03:48 +0200 Subject: LibC: Fix struct layout for sys_dirent on x86_64 --- Userland/Libraries/LibC/dirent.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Userland/Libraries/LibC/dirent.cpp') 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; } }; -- cgit v1.2.3