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)
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 7bf7b048a..3a7dd6f4c 100644
--- a/openbsd-compat/bsd-misc.h
+++ b/openbsd-compat/bsd-misc.h
@@ -88,10 +88,12 @@ struct timespec {
88#endif /* !HAVE_STRUCT_TIMESPEC */ 88#endif /* !HAVE_STRUCT_TIMESPEC */
89 89
90#if !defined(HAVE_NANOSLEEP) && !defined(HAVE_NSLEEP) 90#if !defined(HAVE_NANOSLEEP) && !defined(HAVE_NSLEEP)
91# include <time.h>
91int nanosleep(const struct timespec *, struct timespec *); 92int nanosleep(const struct timespec *, struct timespec *);
92#endif 93#endif
93 94
94#ifndef HAVE_UTIMENSAT 95#ifndef HAVE_UTIMENSAT
96# include <time.h>
95/* start with the high bits and work down to minimise risk of overlap */ 97/* start with the high bits and work down to minimise risk of overlap */
96# ifndef AT_SYMLINK_NOFOLLOW 98# ifndef AT_SYMLINK_NOFOLLOW
97# define AT_SYMLINK_NOFOLLOW 0x80000000 99# define AT_SYMLINK_NOFOLLOW 0x80000000