Hi again, Last year after a great deal of discussion, we got most of the issues between gnulib and musl libc fixed. However there's one problem that keeps coming up again and again from our users: when cross-compiling, gnulib treats fseeko (well, actually fflush(stdin), which in turn requires a replacement fseeko) as broken by default (since it can't run tests to check) and the #else case in gnulib's fseeko.c contains #error.
Presumably it's possible to work around this issue by creating a config.cache file that overrides gl_cv_func_fflush_stdin=yes, but that requires a bit of manual intervention to make it work, and it would give a much nicer user experience if things just worked out of the box. I have a couple proposed solutions for gnulib's fseeko.c: 1. In the #else case, instead of #error, put if(0). In other words, treat unknown platforms as having working fseeko that does not need any of the replacement code; execution would simply fall through to the call to the real fseeko at the end of the function. 2. Write a "portable" version of the replacement code for the #else case (or to replace all the existing cases) in terms of standard functions and other existing gnulib extended-stdio functions. I don't understand well enough what it's doing to judge whether this is feasible, but this seems to be the mechanism by which the replacement fflush is currently working on musl; all of the functions it calls in the #else cases are either standard functions or other gnulib functions. I like the first option better. What do you think? Rich