On Wed, Mar 1, 2023 at 3:00 PM Johannes Schauer Marin Rodrigues <jo...@debian.org> wrote: > > Hi Shengjing, > > Quoting Shengjing Zhu (2023-03-01 06:40:38) > > I've debugged it as well and here is my write up. Though I don't have > > solution yet. > > you don't have a *good* solution yet but I think you are extremely close! > Thank > you so much for spending all the time debugging this *and* for this very > helpful writeup which is helpful for guys like me who could've never come this > far by themselves. Thank you! :) > > Would it maybe possible to choose the correct stat struct by trying to see > with > which struct the values make sense? For example it should be easy to check > which inode numbers actually exist. The other entries of the stat struct also > can be checked if they look legitimate, like the file mode (which should not > be > larger than 0o4777).
I realized there probably was no need for runtime detection after some discussion with others. After all, it has already dispatched the right _time64 function. But on i386, the only case to use _time64 function is when compiled with D_TIME_BITS=64. So there shouldn't be two variants of stat64 struct. It's just fakeroot is using the wrong one. fakeroot should compile its all time64 funcs with D_TIME_BITS=64, then it should get the right struct. (only these _time64 parts, so be in separate files.) I'm still exploring this idea, but anyone more familiar with autoconf would be helpful! -- Shengjing Zhu