mirror of
https://github.com/clearlinux/graphene.git
synced 2026-10-03 15:39:36 +00:00
shim_types.h: __kernel_timespec, __kernel_itimerspec
From Linux 4.18.0, it's defined int uapi/time.h. This patch makes it compile with Linux 4.18.0 or later. Signed-off-by: Isaku Yamahata <isaku.yamahata@gmail.com>
This commit is contained in:
committed by
Don Porter
parent
7ec3baeabe
commit
aca39921de
@@ -22,6 +22,7 @@
|
||||
#include <linux/aio_abi.h>
|
||||
#include <linux/perf_event.h>
|
||||
#include <linux/timex.h>
|
||||
#include <linux/version.h>
|
||||
|
||||
#include <asm/posix_types.h>
|
||||
#include <asm/statfs.h>
|
||||
@@ -48,20 +49,22 @@ typedef __kernel_timer_t timer_t;
|
||||
typedef __kernel_fd_set fd_set;
|
||||
|
||||
/* linux/time.h */
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 18, 0)
|
||||
struct __kernel_timespec {
|
||||
__kernel_time_t tv_sec; /* seconds */
|
||||
long tv_nsec; /* nanoseconds */
|
||||
};
|
||||
|
||||
struct __kernel_timeval {
|
||||
__kernel_time_t tv_sec; /* seconds */
|
||||
__kernel_suseconds_t tv_usec; /* microsecond */
|
||||
};
|
||||
|
||||
struct __kernel_itimerspec {
|
||||
struct __kernel_timespec it_interval; /* timer period */
|
||||
struct __kernel_timespec it_value; /* timer expiration */
|
||||
};
|
||||
#endif
|
||||
|
||||
struct __kernel_timeval {
|
||||
__kernel_time_t tv_sec; /* seconds */
|
||||
__kernel_suseconds_t tv_usec; /* microsecond */
|
||||
};
|
||||
|
||||
struct __kernel_itimerval {
|
||||
struct __kernel_timeval it_interval; /* time interval */
|
||||
|
||||
Reference in New Issue
Block a user