shithub: 9pro

Download patch

ref: 22ad91e21a2307085404932db094c6443ccf5000
parent: a82e8034cd0f44560eeb91269e992399700fb86f
author: Sigrid Solveig Haflínudóttir <ftrvxmtrx@gmail.com>
date: Fri Nov 20 13:29:26 EST 2020

use st_[ac]tim

--- a/9pex.c
+++ b/9pex.c
@@ -224,7 +224,7 @@
 	int fmt;
 
 	qid->path = st->st_ino;
-	qid->version = crc32(&st->st_ctim, sizeof(st->st_ctime));
+	qid->version = crc32(&st->st_ctim, sizeof(st->st_ctim));
 	qid->type = C9qtfile;
 	fmt = st->st_mode & S_IFMT;
 	if (fmt == S_IFDIR)
@@ -520,8 +520,8 @@
 	stout->size = st->st_size;
 	stat2qid(st, &stout->qid, NULL);
 	stout->name = name;
-	stout->atime = st->st_atime;
-	stout->mtime = st->st_ctime;
+	stout->atime = st->st_atim.tv_sec;
+	stout->mtime = st->st_ctim.tv_sec;
 
 	fmt = st->st_mode & S_IFMT;
 	if (fmt == S_IFDIR)