Cannot build fstat.c on mingw
I get an error with compiling: In file included from fstat.c:52: stat-time.h: In function ‘get_stat_atime_ns’: stat-time.h:52:43: error: invalid use of undefined type ‘const struct _stati64’ 52 | # define STAT_TIMESPEC(st, st_xtim) ((st)->st_xtim) and lots more the same. I came across this when trying to build GNU libiconv 1.17, which seems to use the current version of fstat.c. -- https://rrt.sc3d.org
Re: Cannot build fstat.c on mingw
Reuben Thomas wrote: > I get an error with compiling: > > In file included from fstat.c:52: > stat-time.h: In function ‘get_stat_atime_ns’: > stat-time.h:52:43: error: invalid use of undefined type ‘const struct > _stati64’ >52 | # define STAT_TIMESPEC(st, st_xtim) ((st)->st_xtim) > > and lots more the same. > > I came across this when trying to build GNU libiconv 1.17, which seems to > use the current version of fstat.c. GNU libiconv 1.17 compiles fine for mingw (w64 flavour, as shipped with Cygwin 2.9.0), for me. So, the cause could be that you are using a different version of mingw. You might not be the only one. Therefore it would be useful if you could analyze this failure. Then, let's see what is the best way forward (in Gnulib and in libiconv). Thanks! Bruno
Re: Cannot build fstat.c on mingw
On Sun, 26 Feb 2023 at 19:17, Bruno Haible wrote: > So, the cause could be that you are using a different version of mingw. > You might not be the only one. Therefore it would be useful if you could > analyze this failure. Then, let's see what is the best way forward (in > Gnulib and in libiconv). > I just got back to working on this, and the problem seems to have gone away. Maybe an MSYS2 update fixed it, maybe it was a Heisenbug. -- https://rrt.sc3d.org