diff mbox series

[08/74] backports: add kunit/visibility.h

Message ID 20240524190906.048a9ecd29ec.Iacef906e369bb75e3c13557b3252f53e7442857f@changeid (mailing list archive)
State New, archived
Headers show
Series backport updates from Intel | expand

Commit Message

Johannes Berg May 24, 2024, 5:07 p.m. UTC
From: Gregory Greenman <gregory.greenman@intel.com>

Starting from v6.7 some files include kunit/visibility.h
Add this include, since it was added only in v6.2 by
9c988fae6f6a ("kunit: add macro to allow conditionally exposing static symbols to tests")

Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
 backport/backport-include/kunit/visibility.h | 12 ++++++++++++
 1 file changed, 12 insertions(+)
 create mode 100644 backport/backport-include/kunit/visibility.h
diff mbox series

Patch

diff --git a/backport/backport-include/kunit/visibility.h b/backport/backport-include/kunit/visibility.h
new file mode 100644
index 000000000000..a23992aa8920
--- /dev/null
+++ b/backport/backport-include/kunit/visibility.h
@@ -0,0 +1,12 @@ 
+#ifndef __BP_KUNIT_VISIBILITY_H
+#define __BP_KUNIT_VISIBILITY_H
+#include <linux/version.h>
+
+#if LINUX_VERSION_IS_LESS(6,2,0)
+#define VISIBLE_IF_KUNIT static
+#define EXPORT_SYMBOL_IF_KUNIT(symbol)
+#else
+#include_next <kunit/visibility.h>
+#endif
+
+#endif /* __BP_KUNIT_VISIBILITY_H */