aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorBrent Cook <busterb@gmail.com>2019-01-07 06:28:29 -0600
committerBrent Cook <busterb@gmail.com>2019-01-07 06:28:29 -0600
commit4eb8da3e07717103fceadf7138a3f377ab1c5110 (patch)
treed8dc02275cac927e77778fdf619ed94d4e5f7cf3 /include
parent1e848d2e4eaa5664d99b0e59f124f1eabf039f05 (diff)
parentc1a44d2220db94fb3bb4d74e6ae4badbb2da6a62 (diff)
downloadportable-4eb8da3e07717103fceadf7138a3f377ab1c5110.tar.gz
portable-4eb8da3e07717103fceadf7138a3f377ab1c5110.tar.bz2
portable-4eb8da3e07717103fceadf7138a3f377ab1c5110.zip
Land #496, add configure-time check for timespecsub
Diffstat (limited to 'include')
-rw-r--r--include/compat/time.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/compat/time.h b/include/compat/time.h
index ccedba3..540807d 100644
--- a/include/compat/time.h
+++ b/include/compat/time.h
@@ -39,7 +39,11 @@ typedef int clockid_t;
39int clock_gettime(clockid_t clock_id, struct timespec *tp); 39int clock_gettime(clockid_t clock_id, struct timespec *tp);
40#endif 40#endif
41 41
42#ifndef timespecsub 42#ifdef timespecsub
43#define HAVE_TIMESPECSUB
44#endif
45
46#ifndef HAVE_TIMESPECSUB
43#define timespecsub(tsp, usp, vsp) \ 47#define timespecsub(tsp, usp, vsp) \
44 do { \ 48 do { \
45 (vsp)->tv_sec = (tsp)->tv_sec - (usp)->tv_sec; \ 49 (vsp)->tv_sec = (tsp)->tv_sec - (usp)->tv_sec; \
@@ -50,6 +54,7 @@ int clock_gettime(clockid_t clock_id, struct timespec *tp);
50 } \ 54 } \
51 } while (0) 55 } while (0)
52#endif 56#endif
57
53#endif 58#endif
54 59
55#endif 60#endif