mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-11-17 18:11:00 +03:00
6a6cafbe8d
building against a wider range of kernels. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@152 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c
22 lines
542 B
C
22 lines
542 B
C
#ifndef _SPL_TIME_COMPAT_H
|
|
#define _SPL_TIME_COMPAT_H
|
|
|
|
#include <linux/time.h>
|
|
|
|
/* timespec_sub() API changes
|
|
* 2.6.18 - 2.6.x: Inline function provided by linux/time.h
|
|
*/
|
|
#ifndef HAVE_TIMESPEC_SUB
|
|
static inline struct timespec
|
|
timespec_sub(struct timespec lhs, struct timespec rhs)
|
|
{
|
|
struct timespec ts_delta;
|
|
set_normalized_timespec(&ts_delta, lhs.tv_sec - rhs.tv_sec,
|
|
lhs.tv_nsec - rhs.tv_nsec);
|
|
return ts_delta;
|
|
}
|
|
#endif /* HAVE_TIMESPEC_SUB */
|
|
|
|
#endif /* _SPL_TIME_COMPAT_H */
|
|
|