gio: properly guard use of utimensat()

Closes #2766.
This commit is contained in:
Peter Williams 2022-09-21 11:56:33 -04:00
parent 87b4771d1f
commit 7f7171e68a

View File

@ -2800,6 +2800,7 @@ set_mtime_atime (char *filename,
return FALSE; return FALSE;
} }
#if defined (HAVE_UTIMENSAT)
res = utimensat (AT_FDCWD, filename, times_n, 0); res = utimensat (AT_FDCWD, filename, times_n, 0);
if (res == -1) if (res == -1)
{ {
@ -2811,6 +2812,7 @@ set_mtime_atime (char *filename,
g_strerror (errsv)); g_strerror (errsv));
return FALSE; return FALSE;
} }
#endif
return TRUE; return TRUE;
} }
#endif #endif