It's been drawn to my attention that under some circumstances, gnulib fails to include progname when it's needed. When cross-compiling error.c (as required by fstat) for mingw32, I get a link failure to _program_name (presumably because of error_print_progname).
-- http://rrt.sc3d.org