diff options
author | Lucas De Marchi <lucas.demarchi@intel.com> | 2020-12-18 08:02:08 -0800 |
---|---|---|
committer | Lucas De Marchi <lucas.demarchi@intel.com> | 2020-12-27 16:40:08 -0800 |
commit | e4a72e4754304ebd53eb81dd013b234de54aecf0 (patch) | |
tree | d72dd64c1ff39a98f818ac3f0b910bd503ee1401 /testsuite | |
parent | 220b4c55ec219d6a9e10fc343df4691fbe5339b1 (diff) | |
download | kmod-e4a72e4754304ebd53eb81dd013b234de54aecf0.tar.gz |
shared: fix UNIQ definition
We need a macro indirection for UNIQ to work. Otherwise it won't be
unique at all since it will just append "UNIQ" to the name:
In file included from testsuite/test-init.c:30:
testsuite/testsuite.h:142:27: error: redefinition of ‘stest_load_resourcesUNIQ’
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/testsuite.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/testsuite/testsuite.h b/testsuite/testsuite.h index 7ed96bf..f190249 100644 --- a/testsuite/testsuite.h +++ b/testsuite/testsuite.h @@ -139,7 +139,7 @@ int test_run(const struct test *t); /* Test definitions */ #define DEFINE_TEST(_name, ...) \ - static const struct test s##_name##UNIQ \ + static const struct test UNIQ(s##_name) \ __attribute__((used, section("kmod_tests"), aligned(8))) = { \ .name = #_name, \ .func = _name, \ |