etc/services - sync with NetBSD-8
[minix.git] / minix / lib / libc / sys / futimens.c
blob73b3315a9ddf54bc7d6ad7a4a8feecbcb46c133b
1 #include <sys/cdefs.h>
2 #include "namespace.h"
3 #include <lib.h>
5 #include <string.h>
6 #include <sys/stat.h>
8 int futimens(int fd, const struct timespec tv[2])
10 message m;
11 static const struct timespec now[2] = { {0, UTIME_NOW}, {0, UTIME_NOW} };
13 if (tv == NULL) tv = now;
15 memset(&m, 0, sizeof(m));
16 m.m_vfs_utimens.fd = fd;
17 m.m_vfs_utimens.atime = tv[0].tv_sec;
18 m.m_vfs_utimens.mtime = tv[1].tv_sec;
19 m.m_vfs_utimens.ansec = tv[0].tv_nsec;
20 m.m_vfs_utimens.mnsec = tv[1].tv_nsec;
21 m.m_vfs_utimens.name = NULL;
22 m.m_vfs_utimens.flags = 0;
24 return(_syscall(VFS_PROC_NR, VFS_UTIMENS, &m));