file/fat: add utime function

This emulates the traditional utime function from UNIX clones to allow
for manual updates of the modification timestamp on files and directories.

This should only prove useful for non-native targets as those usually
have a libc version of utime.

Change-Id: Iea8a1d328e78b92c400d3354ee80689c7cf53af8
This commit is contained in:
James Buren 2021-07-07 21:06:31 +00:00 committed by Solomon Peachy
parent e6ee3dd17c
commit c174d3a544
6 changed files with 87 additions and 0 deletions

View file

@ -28,6 +28,12 @@ struct tm
#if !defined(_TIME_T_DEFINED) && !defined(_TIME_T_DECLARED)
typedef long time_t;
struct utimbuf
{
time_t actime;
time_t modtime;
};
/* this define below is used by the mingw headers to prevent duplicate
typedefs */
#define _TIME_T_DEFINED