]>
git.proxmox.com Git - mirror_spl.git/blob - include/linux/time_compat.h
1 #ifndef _SPL_TIME_COMPAT_H
2 #define _SPL_TIME_COMPAT_H
4 #include <linux/time.h>
6 /* timespec_sub() API changes
7 * 2.6.18 - 2.6.x: Inline function provided by linux/time.h
9 #ifndef HAVE_TIMESPEC_SUB
10 static inline struct timespec
11 timespec_sub(struct timespec lhs
, struct timespec rhs
)
13 struct timespec ts_delta
;
14 set_normalized_timespec(&ts_delta
, lhs
.tv_sec
- rhs
.tv_sec
,
15 lhs
.tv_nsec
- rhs
.tv_nsec
);
18 #endif /* HAVE_TIMESPEC_SUB */
20 #endif /* _SPL_TIME_COMPAT_H */