libc

my libc
git clone git://git.evenfri.xyz/libc.git
Log | Files | Refs | README

utime.c (283B)


      1 /*
      2  * utime.c - update timestamp of file
      3  * Copyright (C) 2026. All rights reserved.
      4  */
      5 
      6 #include "libc.h"
      7 
      8 int utime(const char *path, const struct utimbuf *times) {
      9   int ret = syscall(SYS_utime, path, times);
     10   if (ret < 0) {
     11     errno = -ret;
     12     return -1;
     13   }
     14   return ret;
     15 }