fix regression in alignment of dirent structs produced by readdir
commit 32482f61 reduced the number of int members before the dirent buf from 4 to 3, thereby misaligning it mod sizeof(off_t), producing invalid accesses on any arch where alignof(off_t)==sizeof(off_t). rather than re-adding wasted padding, reorder the struct to meet the requirement and add a comment and static assertion to prevent this from getting broken again.
Showing
想要评论请 注册 或 登录