From b468ea77ea86974daf154126acda65bef781cc1d Mon Sep 17 00:00:00 2001 From: Daniel Pouzzner Date: Wed, 21 Oct 2020 14:37:43 -0500 Subject: [PATCH] linuxkm: use EXPORT_SYMBOL_NS(x, WOLFSSL) if available, else fall back to EXPORT_SYMBOL(x). --- linuxkm/Kbuild | 4 ++-- linuxkm/module_exports.c.template | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/linuxkm/Kbuild b/linuxkm/Kbuild index 720fb8a11..5909a1e2a 100644 --- a/linuxkm/Kbuild +++ b/linuxkm/Kbuild @@ -83,9 +83,9 @@ $(src)/linuxkm/module_exports.c: $(src)/linuxkm/module_exports.c.template $(WOLF awk '/^ *[0-9]+: / { \ if ($$8 !~ /^(wc_|wolf)/){next;} \ if (($$4 == "FUNC") && ($$5 == "GLOBAL") && ($$6 == "DEFAULT")) { \ - print "EXPORT_SYMBOL(" $$8 ");"; \ + print "EXPORT_SYMBOL_NS(" $$8 ", WOLFSSL);"; \ } \ }' >> $@ - @echo -e '#ifndef NO_CRYPT_TEST\nEXPORT_SYMBOL(wolfcrypt_test);\n#endif' >> $@ + @echo -e '#ifndef NO_CRYPT_TEST\nEXPORT_SYMBOL_NS(wolfcrypt_test, WOLFSSL);\n#endif' >> $@ clean-files := module_exports.c diff --git a/linuxkm/module_exports.c.template b/linuxkm/module_exports.c.template index 4e00efb4e..a78b7e281 100644 --- a/linuxkm/module_exports.c.template +++ b/linuxkm/module_exports.c.template @@ -33,6 +33,10 @@ #include #endif +#ifndef EXPORT_SYMBOL_NS +#define EXPORT_SYMBOL_NS(sym, ns) EXPORT_SYMBOL(sym) +#endif + #include #include #include