From 404025721fe13d631c3fb65ddbf54d6263deeaf1 Mon Sep 17 00:00:00 2001 From: John Barboza Date: Mon, 25 Jul 2016 09:14:17 -0400 Subject: [PATCH] zos: implement uv__fs_futime MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We do this using __fchattr syscall to change file attributes. PR-URL: https://github.com/libuv/libuv/pull/956 Reviewed-By: Ben Noordhuis Reviewed-By: Saúl Ibarra Corretgé --- src/unix/fs.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/unix/fs.c b/src/unix/fs.c index 37f8e3b6..216ef970 100644 --- a/src/unix/fs.c +++ b/src/unix/fs.c @@ -215,6 +215,14 @@ skip: ts[1].tv_sec = req->mtime; ts[1].tv_nsec = (uint64_t)(req->mtime * 1000000) % 1000000 * 1000; return futimens(req->file, ts); +#elif defined(__MVS__) + attrib_t atr; + memset(&atr, 0, sizeof(atr)); + atr.att_mtimechg = 1; + atr.att_atimechg = 1; + atr.att_mtime = req->mtime; + atr.att_atime = req->atime; + return __fchattr(req->file, &atr, sizeof(atr)); #else errno = ENOSYS; return -1;