The utimes syscall is needed for musl support because musl defaults to using the utimes system call rather than utime.
The musl library maps utime library call to the utimes system call.
The utimes syscall uses a timeval structures which support microseconds, which is different from utime which only supports seconds.
The forthcoming PR is mostly a copy of utime with small modifications.
Since the current Fiwix file systems do not support microseconds that field is currently ignored.
A test program is attached. The following output shows the file time being updated with the test program.
The utimes syscall is needed for musl support because musl defaults to using the utimes system call rather than utime. The musl library maps utime library call to the utimes system call.
The utimes syscall uses a timeval structures which support microseconds, which is different from utime which only supports seconds.
The forthcoming PR is mostly a copy of utime with small modifications. Since the current Fiwix file systems do not support microseconds that field is currently ignored.
A test program is attached. The following output shows the file time being updated with the test program.
testutimes.c.gz