summaryrefslogtreecommitdiff
path: root/openbsd-compat
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@dtucker.net>2019-10-28 16:00:45 +1100
committerDarren Tucker <dtucker@dtucker.net>2019-10-28 16:27:53 +1100
commit7169e31121e8c8cc729b55154deb722ae495b316 (patch)
tree512572ff1a31541da2a44bb25ca4b27803675c50 /openbsd-compat
parent850ec1773d656cbff44d78a79e369dc262ce5853 (diff)
Move utimensat definition into timespec section.
Since utimensat uses struct timespec, move it to the section where we define struct timespec when needed.
Diffstat (limited to 'openbsd-compat')
-rw-r--r--openbsd-compat/bsd-misc.h22
1 files changed, 12 insertions, 10 deletions
diff --git a/openbsd-compat/bsd-misc.h b/openbsd-compat/bsd-misc.h
index cb158cd5c..23c18d676 100644
--- a/openbsd-compat/bsd-misc.h
+++ b/openbsd-compat/bsd-misc.h
@@ -64,14 +64,6 @@ struct timeval {
64int utimes(char *, struct timeval *); 64int utimes(char *, struct timeval *);
65#endif /* HAVE_UTIMES */ 65#endif /* HAVE_UTIMES */
66 66
67#ifndef HAVE_UTIMENSAT
68/* start with the high bits and work down to minimise risk of overlap */
69# ifndef AT_SYMLINK_NOFOLLOW
70# define AT_SYMLINK_NOFOLLOW 0x80000000
71# endif
72int utimensat(int, const char *, const struct timespec[2], int);
73#endif
74
75#ifndef AT_FDCWD 67#ifndef AT_FDCWD
76# define AT_FDCWD (-2) 68# define AT_FDCWD (-2)
77#endif 69#endif
@@ -88,16 +80,26 @@ int fchownat(int, const char *, uid_t, gid_t, int);
88int truncate (const char *, off_t); 80int truncate (const char *, off_t);
89#endif /* HAVE_TRUNCATE */ 81#endif /* HAVE_TRUNCATE */
90 82
91#if !defined(HAVE_NANOSLEEP) && !defined(HAVE_NSLEEP)
92#ifndef HAVE_STRUCT_TIMESPEC 83#ifndef HAVE_STRUCT_TIMESPEC
93struct timespec { 84struct timespec {
94 time_t tv_sec; 85 time_t tv_sec;
95 long tv_nsec; 86 long tv_nsec;
96}; 87};
97#endif 88
89#if !defined(HAVE_NANOSLEEP) && !defined(HAVE_NSLEEP)
98int nanosleep(const struct timespec *, struct timespec *); 90int nanosleep(const struct timespec *, struct timespec *);
99#endif 91#endif
100 92
93#ifndef HAVE_UTIMENSAT
94/* start with the high bits and work down to minimise risk of overlap */
95# ifndef AT_SYMLINK_NOFOLLOW
96# define AT_SYMLINK_NOFOLLOW 0x80000000
97# endif
98int utimensat(int, const char *, const struct timespec[2], int);
99#endif /* !HAVE_UTIMENSAT */
100
101#endif /* !HAVE_STRUCT_TIMESPEC */
102
101#ifndef HAVE_USLEEP 103#ifndef HAVE_USLEEP
102int usleep(unsigned int useconds); 104int usleep(unsigned int useconds);
103#endif 105#endif