#include "apue.h"
#include <sys/types.h>
#include <utime.h> 
 
int main(){
  struct utimbuf tbuf;
 
  // both type of tbuf.actime and time() is time_t,
  // but why can't this assignment happen?
  tbuf.actime = time();
  tbuf.modtime = time();
  if(utime("hello.c", &tbuf) < 0)
    err_sys("utime error for hello.c"); 
}

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-09-05
  • 2021-04-30
  • 2021-08-06
  • 2021-07-02
  • 2021-09-23
猜你喜欢
  • 2021-09-10
  • 2021-06-12
  • 2021-07-16
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-14
相关资源
相似解决方案