This change is needed for the driver to compile on 4.18 and newer kernels:
Code: Select all
diff --git a/driver/MTAL_LKernelAPI.c b/driver/MTAL_LKernelAPI.c
index 6f8cc20..be0a44e 100644
--- a/driver/MTAL_LKernelAPI.c
+++ b/driver/MTAL_LKernelAPI.c
@@ -185,7 +185,10 @@ void MTAL_LK_write_unlock_irqrestore(MTAL_LK_rwlock_ptr rwlock, unsigned long fl
uint64_t MTAL_LK_GetCounterTime(void) // 100 ns precision
{
uint64_t timeVal = 0ull;
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,18,0) // getrawmonotonic64 deprecated in mid-2018
+ struct timespec64 ts64;
+ ktime_get_raw_ts64(&ts64);
+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0)
struct timespec64 ts64;
getrawmonotonic64(&ts64);
#else