arch/posix: Fix main() renaming trickery

It turns out that SOF is already using a symbol named
"zephyr_app_main()", so this produces a collision.  Pick something
that looks more relevant to "posix", and put an underscore on it (it's
a "system" symbol, after all).

Signed-off-by: Andy Ross <andyross@google.com>
This commit is contained in:
Andy Ross 2022-08-25 17:08:57 -07:00 committed by Fabio Baltieri
parent ec44bc435c
commit 99dd845067

View file

@ -41,7 +41,7 @@
* we free the function name "main" for its normal purpose
*/
#ifndef main
#define main(...) zephyr_app_main(__VA_ARGS__)
#define main(...) _posix_zephyr_main(__VA_ARGS__)
#endif
#ifdef __cplusplus
@ -52,7 +52,7 @@ extern "C" {
* from finding it. Zephyr assumes a void main(void) prototype and therefore
* this will be the prototype after renaming:
*/
void zephyr_app_main(void);
void _posix_zephyr_main(void);
#ifdef __cplusplus
}