Преглед на файлове

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);