diff --git a/libtock/crt0.c b/libtock/crt0.c index befd1ac69..3c335895d 100644 --- a/libtock/crt0.c +++ b/libtock/crt0.c @@ -13,7 +13,7 @@ #error Fixed STACK_SIZE. #endif -extern int main(void); +extern int main(int argc, char *argv[]); // Allow _start to go undeclared #pragma GCC diagnostic ignored "-Wmissing-declarations" @@ -328,7 +328,7 @@ void _c_start_pic(uint32_t app_start, uint32_t mem_start) { } } - exit(main()); + exit(main(0, NULL)); } // C startup routine for apps compiled with fixed addresses (i.e. no PIC). @@ -362,5 +362,5 @@ void _c_start_nopic(uint32_t app_start, uint32_t mem_start) { char* bss_start = (char*)(myhdr->bss_start + mem_start); memset(bss_start, 0, myhdr->bss_size); - exit(main()); + exit(main(0, NULL)); }