[PATCH 08/74] backports: add kunit/visibility.h
Johannes Berg <[email protected]> Fri, 24 May 2024 19:07:20 +0200
| Newsgroups | org.kernel.vger.backports |
|---|---|
| Message-ID | <20240524190906.048a9ecd29ec.Iacef906e369bb75e3c13557b3252f53e7442857f@changeid> |
From: Gregory Greenman <[email protected]> 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 <[email protected]> Signed-off-by: Johannes Berg <[email protected]> --- backport/backport-include/kunit/visibility.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 backport/backport-include/kunit/visibility.h 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 */ -- 2.45.1