summaryrefslogtreecommitdiff
path: root/openbsd-compat/bsd-misc.h
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@dtucker.net>2020-01-14 09:42:52 +1100
committerDarren Tucker <dtucker@dtucker.net>2020-01-14 14:28:01 +1100
commite0cedcad51fe02683943bf4f1ad2961aa3f35313 (patch)
treecb8a3197f708f4b1b51809661ec885689521f2bc /openbsd-compat/bsd-misc.h
parentacaf9e058594310001ce64468ed2923dc6323e81 (diff)
downloadopenssh-git-e0cedcad51fe02683943bf4f1ad2961aa3f35313.tar.gz
Improve search for 'struct timespec'.
Make struct timespec test consistent with existing timeval test. Include time.h for timespec in compat header where required.
Diffstat (limited to 'openbsd-compat/bsd-misc.h')
-rw-r--r--openbsd-compat/bsd-misc.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/openbsd-compat/bsd-misc.h b/openbsd-compat/bsd-misc.h
index 7bf7b048..3a7dd6f4 100644
--- a/openbsd-compat/bsd-misc.h
+++ b/openbsd-compat/bsd-misc.h
@@ -88,10 +88,12 @@ struct timespec {
#endif /* !HAVE_STRUCT_TIMESPEC */
#if !defined(HAVE_NANOSLEEP) && !defined(HAVE_NSLEEP)
+# include <time.h>
int nanosleep(const struct timespec *, struct timespec *);
#endif
#ifndef HAVE_UTIMENSAT
+# include <time.h>
/* start with the high bits and work down to minimise risk of overlap */
# ifndef AT_SYMLINK_NOFOLLOW
# define AT_SYMLINK_NOFOLLOW 0x80000000