瀏覽代碼

Use st_mtime instead of st_mtim.tv_sec

The latter might be linux specific, and as we don't need nanosecond
precision we can just use st_mtime.
Lucas Stadler 9 年之前
父節點
當前提交
532f059d71
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      c/ton/main.c

+ 1 - 1
c/ton/main.c

@ -703,7 +703,7 @@ char *get_contents(char *path, time_t *last_modified) {
703 703
	}
704 704
705 705
	if (last_modified != NULL) {
706
		*last_modified = f_stat.st_mtim.tv_sec;
706
		*last_modified = f_stat.st_mtime;
707 707
	}
708 708
709 709
	char *buf = malloc(f_stat.st_size + 1);