Skip to content

Commit a7ae3a3

Browse files
MaureenHelmdpgeorge
authored andcommitted
zephyr: Change main function to return an int.
Zephyr v3.4.0 changed the declaration of the main function to return an int to allow building Zephyr without the -ffreestanding compiler flag. Signed-off-by: Maureen Helm <maureen.helm@analog.com>
1 parent 90c5b04 commit a7ae3a3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ports/zephyr/src/zephyr_start.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,13 @@
2929
int real_main(void);
3030
int mp_console_init(void);
3131

32-
void main(void) {
32+
int main(void) {
3333
#ifdef CONFIG_CONSOLE_SUBSYS
3434
mp_console_init();
3535
#else
3636
zephyr_getchar_init();
3737
#endif
3838
real_main();
39+
40+
return 0;
3941
}

0 commit comments

Comments
 (0)