#
711e2dc0 |
|
01-Dec-2021 |
Augustin Cavalier <waddlesplash@gmail.com> |
Adjust all struct dirent creations (again), this time to use offsetof(). The dirent struct is not packed, so offsetof(dirent, d_name) != sizeof(dirent). Thus in order not to waste the alignment bytes (which are significant, on x86_64 at least, sizeof(dirent)==32, but offsetof(...)=26.) This is also the most portable way to handle things, and should work just fine in cross-platform code that has a non-zero-sized d_name.
|