diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-02-15 12:30:48 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-02-15 12:30:48 +0100 |
commit | 022f7790db45ba61740b41a4807d9b7d2a732916 (patch) | |
tree | 1fc8e5883e6beaac1e4d3d3bda1a22b94bd1e792 /LibC/dirent.cpp | |
parent | fbcc8ab840aaa212934da0082a039038c8a81e53 (diff) | |
download | serenity-022f7790db45ba61740b41a4807d9b7d2a732916.zip |
Use modern C++ attributes instead of __attribute__ voodoo.
This is quite nice, although I wish [[gnu::always_inline]] implied inline.
Also "gnu::" is kind of a wart, but whatcha gonna do.
Diffstat (limited to 'LibC/dirent.cpp')
-rw-r--r-- | LibC/dirent.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/LibC/dirent.cpp b/LibC/dirent.cpp index c511b9dad6..ef1ec33bc2 100644 --- a/LibC/dirent.cpp +++ b/LibC/dirent.cpp @@ -35,7 +35,7 @@ int closedir(DIR* dirp) return rc; } -struct sys_dirent { +struct [[gnu::packed]] sys_dirent { ino_t ino; byte file_type; size_t namelen; @@ -44,7 +44,7 @@ struct sys_dirent { { return sizeof(ino_t) + sizeof(byte) + sizeof(size_t) + sizeof(char) * namelen; } -} __attribute__ ((packed)); +}; dirent* readdir(DIR* dirp) { |