Description
From Debian packaging. On mips64le, golang developers provided the older getdents
syscall instead of the newer getdents64
. Gocryptfs (and also Go-Fuse) depends on the newer syscall and produces nonsensical output on mips64le.
The Dirent
structure that ships with golang was not meant be be used with getdents
but with glibc's readdir
(at least on Linux, please see NOTES in manpage). By coincidence or by design, it works with the newer syscall and is often used that way, but it does not work as shipped in golang on mips64le. An important difference is the implementation of the Type
member, which was declared explicitly for the newer call. In the older linux_dirent
structure it is located at Reclen - 1
. One could perhaps make a case that syscall.Getdirent
should be renamed on mips64le, or that both calls should be provided.
While we could probably fix gocryptfs via build constraints, I think the issue should be addressed upstream. What do you think, please? Thank you!