nc icon indicating copy to clipboard operation
nc copied to clipboard

Fix offset error in linux_dirent_t

Open XuShaohua opened this issue 1 year ago • 1 comments

In struct linux_dirent:

  • offset of d_name is: 18
  • offset of d_reclen is: 16

While in nc::linux_dirent_t:

  • offset of d_name is: 24
  • offset of d_reclen is: 16

Thus output of examples/dir.rs is invalid.

XuShaohua avatar Oct 09 '24 09:10 XuShaohua

Remove mem::offset_of!(), as it is available in rust 1.77.

XuShaohua avatar Oct 09 '24 10:10 XuShaohua