diff options
author | Darren Tucker <dtucker@dtucker.net> | 2019-01-18 11:09:01 +1100 |
---|---|---|
committer | Darren Tucker <dtucker@dtucker.net> | 2019-01-18 11:09:01 +1100 |
commit | a6258e5dc314c7d504ac9f0fbc3be96475581dbe (patch) | |
tree | 19047ce95b4608e7791ef419452c000055a6dac7 /openbsd-compat/bsd-misc.h | |
parent | 091093d25802b87d3b2b09f2c88d9f33e1ae5562 (diff) | |
download | openssh-git-a6258e5dc314c7d504ac9f0fbc3be96475581dbe.tar.gz |
Add minimal fchownat and fchmodat implementations.
Fixes builds on at least OS X Lion, NetBSD 6 and Solaris 10.
Diffstat (limited to 'openbsd-compat/bsd-misc.h')
-rw-r--r-- | openbsd-compat/bsd-misc.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/openbsd-compat/bsd-misc.h b/openbsd-compat/bsd-misc.h index 584c2b5e..cb158cd5 100644 --- a/openbsd-compat/bsd-misc.h +++ b/openbsd-compat/bsd-misc.h @@ -72,6 +72,18 @@ int utimes(char *, struct timeval *); 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 */ |