shithub: npe

Download patch

ref: 0d98a32151079982dd23af0f3eca91b971eb1d6b
parent: 720ba9765a63caefebafc4d2923dd10febfe99e9
author: Jacob Moody <moody@posixcafe.org>
date: Wed Mar 27 00:28:52 EDT 2024

npe: add atime to *stat

--- a/include/npe/unistd.h
+++ b/include/npe/unistd.h
@@ -47,6 +47,7 @@
 	uvlong st_size;
 	int st_mode;
 	long st_mtime;
+	long st_atime;
 };
 
 int npe_stat(char *filename, struct stat *buf);
--- a/libnpe/fstat.c
+++ b/libnpe/fstat.c
@@ -15,6 +15,7 @@
 
 	buf->st_size = d->length;
 	buf->st_mtime = d->mtime;
+	buf->st_atime = d->atime;
 	buf->st_mode = d->mode & 0777;
 	if(d->mode & DMDIR)
 		buf->st_mode |= S_IFDIR;
--- a/libnpe/stat.c
+++ b/libnpe/stat.c
@@ -15,6 +15,7 @@
 
 	buf->st_size = d->length;
 	buf->st_mtime = d->mtime;
+	buf->st_atime = d->atime;
 	buf->st_mode = d->mode & 0777;
 	if(d->mode & DMDIR)
 		buf->st_mode |= S_IFDIR;