Skip to content

Instantly share code, notes, and snippets.

@ObserverHerb
Created November 24, 2017 06:26
Show Gist options
  • Save ObserverHerb/8686e6a4bf1018eec7878679ec96ac9c to your computer and use it in GitHub Desktop.
Save ObserverHerb/8686e6a4bf1018eec7878679ec96ac9c to your computer and use it in GitHub Desktop.
Fix missing task_stack definition
diff --git a/kernel/common/inc/nv-lock.h b/kernel/common/inc/nv-lock.h
index f2ef557..2880faf 100644
--- a/kernel/common/inc/nv-lock.h
+++ b/kernel/common/inc/nv-lock.h
@@ -13,7 +13,11 @@
#include "conftest.h"
+#include <linux/version.h>
#include <linux/spinlock.h>
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0)
+#include <linux/sched/task_stack.h>
+#endif
#if defined(NV_LINUX_SEMAPHORE_H_PRESENT)
#include <linux/semaphore.h>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment