Rather than use weak symbols, expose stubs symbols when needed. Signed-off-by: David Marchand <david.march...@redhat.com> --- drivers/bus/auxiliary/auxiliary_common.c | 6 ++++-- drivers/bus/auxiliary/meson.build | 1 + 2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/bus/auxiliary/auxiliary_common.c b/drivers/bus/auxiliary/auxiliary_common.c index e6cbc4d356..b444eb43ef 100644 --- a/drivers/bus/auxiliary/auxiliary_common.c +++ b/drivers/bus/auxiliary/auxiliary_common.c @@ -36,12 +36,13 @@ auxiliary_devargs_lookup(const char *name) return NULL; } +#ifndef AUXILIARY_OS_SUPPORTED /* * Test whether the auxiliary device exist. * * Stub for OS not supporting auxiliary bus. */ -__rte_weak bool +bool auxiliary_dev_exists(const char *name) { RTE_SET_USED(name); @@ -53,11 +54,12 @@ auxiliary_dev_exists(const char *name) * * Stub for OS not supporting auxiliary bus. */ -__rte_weak int +int auxiliary_scan(void) { return 0; } +#endif /* AUXILIARY_OS_SUPPORTED */ /* * Update a device's devargs being scanned. diff --git a/drivers/bus/auxiliary/meson.build b/drivers/bus/auxiliary/meson.build index 10468fd130..38d2f05d4b 100644 --- a/drivers/bus/auxiliary/meson.build +++ b/drivers/bus/auxiliary/meson.build @@ -7,6 +7,7 @@ sources = files( 'auxiliary_params.c', ) if is_linux + cflags += '-DAUXILIARY_OS_SUPPORTED' sources += files( 'linux/auxiliary.c', ) -- 2.48.1