summaryrefslogtreecommitdiff
path: root/openbsd-compat/bsd-misc.h
diff options
context:
space:
mode:
Diffstat (limited to 'openbsd-compat/bsd-misc.h')
-rw-r--r--openbsd-compat/bsd-misc.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/openbsd-compat/bsd-misc.h b/openbsd-compat/bsd-misc.h
index 52ec528538b58..cb158cd5c16bc 100644
--- a/openbsd-compat/bsd-misc.h
+++ b/openbsd-compat/bsd-misc.h
@@ -64,6 +64,26 @@ struct timeval {
int utimes(char *, struct timeval *);
#endif /* HAVE_UTIMES */
+#ifndef HAVE_UTIMENSAT
+/* start with the high bits and work down to minimise risk of overlap */
+# ifndef AT_SYMLINK_NOFOLLOW
+# define AT_SYMLINK_NOFOLLOW 0x80000000
+# endif
+int utimensat(int, const char *, const struct timespec[2], int);
+#endif
+
+#ifndef AT_FDCWD
+# define AT_FDCWD (-2)
+#endif
+
+#ifndef HAVE_FCHMODAT
+int fchmodat(int, const char *, mode_t, int);
+#endif
+
+#ifndef HAVE_FCHOWNAT
+int fchownat(int, const char *, uid_t, gid_t, int);
+#endif
+
#ifndef HAVE_TRUNCATE
int truncate (const char *, off_t);
#endif /* HAVE_TRUNCATE */