diff --git a/src/module/audio/sink_api.c b/src/module/audio/sink_api.c index 8bdfc99fcdc1..a454dbb76706 100644 --- a/src/module/audio/sink_api.c +++ b/src/module/audio/sink_api.c @@ -5,7 +5,17 @@ #include #include +/* + * When building native system-service modules only exported module headers can + * be included, autoconf.h isn't included either. To identify such a build we + * need any symbol that is guaranteed to be defined with any SOF build. + * CONFIG_CORE_COUNT is such a symbol, it is always defined to an integer number + */ +#ifndef CONFIG_CORE_COUNT +#define EXPORT_SYMBOL(...) +#else #include +#endif /* This file contains public sink API functions that were too large to mark is as inline. */ diff --git a/src/module/audio/source_api.c b/src/module/audio/source_api.c index e36dbdf8a0ba..33e62fc6ab2a 100644 --- a/src/module/audio/source_api.c +++ b/src/module/audio/source_api.c @@ -3,10 +3,19 @@ * Copyright(c) 2023 Intel Corporation. All rights reserved. */ - #include #include +/* + * When building native system-service modules only exported module headers can + * be included, autoconf.h isn't included either. To identify such a build we + * need any symbol that is guaranteed to be defined with any SOF build. + * CONFIG_CORE_COUNT is such a symbol, it is always defined to an integer number + */ +#ifndef CONFIG_CORE_COUNT +#define EXPORT_SYMBOL(...) +#else #include +#endif /* This file contains public source API functions that were too large to mark is as inline. */