Merge branch 'wip/pwithnall/fix-ftruncate64' into 'main'

tests: Fix fileutils build on FreeBSD and macOS

See merge request GNOME/glib!3726
This commit is contained in:
Philip Withnall 2023-11-26 22:23:36 +00:00
commit e67a36c479
2 changed files with 5 additions and 1 deletions

View File

@ -1486,8 +1486,11 @@ resize_file (const gchar *filename,
#ifdef G_OS_WIN32
retval = _chsize_s (fd, size);
#else
#elif HAVE_FTRUNCATE64
retval = ftruncate64 (fd, size);
#else
errno = ENOSYS;
retval = -1;
#endif
if (retval != 0)
{

View File

@ -646,6 +646,7 @@ functions = [
'free_aligned_sized',
'free_sized',
'fsync',
'ftruncate64',
'getauxval',
'getc_unlocked',
'getfsstat',