When cross-compiling for MinGW32, the build fails at the "#error" in flac-1.2.1/include/share/alloc.h:
#ifndef SIZE_MAX
# ifndef SIZE_T_MAX
# ifdef _MSC_VER
# define SIZE_T_MAX UINT_MAX
# else
# error
# endif
# endif
# define SIZE_MAX SIZE_T_MAX
#endif
The workaround for "_MSC_VER" is perfectly acceptable for MinGW32, too. So the #ifdef just needs to become more flexible.
The attached patch solves the problem.
Patch that solves the problem
Believe this to be fixed in flac 1.3.0. Closing.