From: Avi Kivity <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]>
diff --git a/kernel/external-module-compat.h b/kernel/external-module-compat.h index a5beda8..1359482 100644 --- a/kernel/external-module-compat.h +++ b/kernel/external-module-compat.h @@ -735,3 +735,21 @@ struct kvm_desc_ptr { unsigned long address; } __attribute__((packed)); +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,21) + +#include <linux/ktime.h> +#include <linux/hrtimer.h> + +#define ktime_get kvm_ktime_get + +static inline ktime_t ktime_get(void) +{ + struct timespec now; + + ktime_get_ts(&now); + + return timespec_to_ktime(now); +} + +#endif + ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ kvm-commits mailing list kvm-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-commits