Insufficient version-test for GLIB/GIO
Submitted by Daniel Macks
Assigned to Shared Mime Info group
Description
Building shared-mime-info-1.4 on a machine with a very old glib passes ./configure (including the glib tests):
checking for ALL... yes checking for GIO... yes
but then compiling fails:
CC update_mime_database-update-mime-database.o update-mime-database.c:3548:2: error: use of undeclared identifier 'GStatBuf' GStatBuf statbuf; ^ update-mime-database.c:3553:31: error: use of undeclared identifier 'statbuf'; did you mean 'setbuf'? retval = g_stat(packagedir, &statbuf); ^~~~~~~
g_stat() has long existed, but the GStatBuf type was only added in glib-2.26.0, but ALL/GIO tests only require >= 2.6.0. It appears that struct GStatBuf is just struct stat on most platforms (all it is is a typedef wrapper in gstdio.h). So it seems easy enough to add backward-compatibility, as in: