diff mbox series

[05/38] backport: include kcov.h in sched.h for kernels < v4.10

Message ID 20221011230356.d66a96d62361.Iee3a886f6b132d9f0a501fcace491dbb5d712500@changeid (mailing list archive)
State New, archived
Headers show
Series backports updates | expand

Commit Message

Johannes Berg Oct. 11, 2022, 9:04 p.m. UTC
From: Luca Coelho <luciano.coelho@intel.com>

In kernel v4.10 and later, kcov.h is included in sched.h.  Now
mac80211 uses some kcov functions, but doesn't include kcov.h
explicitly, since it's included by sched.h.  Include kvoc.h in kernels
older than v4.10 to avoid compilation issues.

type=maint
ticket=jira:WIFI-95070

Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Reviewed-on: https://git-ger-8.devtools.intel.com/gerrit/139719
---
 backport/backport-include/linux/sched.h | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/backport/backport-include/linux/sched.h b/backport/backport-include/linux/sched.h
index 6a5cf8db6b8c..29659af437de 100644
--- a/backport/backport-include/linux/sched.h
+++ b/backport/backport-include/linux/sched.h
@@ -3,6 +3,9 @@ 
 
 #include_next <linux/sched.h>
 #include <linux/version.h>
+#if LINUX_VERSION_IS_LESS(4,10,0)
+#include <linux/kcov.h>
+#endif /* LINUX_VERSION_IS_LESS(4,10,0) */
 
 /* kcov was added in 4.6 and is included since then */
 #if LINUX_VERSION_IS_LESS(4,6,0)