mirror of
https://github.com/apache/nuttx.git
synced 2026-02-06 04:22:26 +08:00
include/stdlib.h: define system()'s prototype for the flat build
The `$(APPDIR)` folder is added to the `$(KERNDEPDIRS)` when `CONFIG_BUILD_KERNEL=y`. The `depend` phase iterates over the `$(KERNDEPDIRS)` folders and executes the `depend` recipe of these folders (including the apps' recipes) with the `__KERNEL__` macro defined, which prevents `system()`'s prototype from being declared.
This commit is contained in:
committed by
archer
parent
c319863834
commit
2ebdd72487
@@ -183,7 +183,7 @@ void _Exit(int status) noreturn_function;
|
||||
* standards compatibility.
|
||||
*/
|
||||
|
||||
#ifndef __KERNEL__
|
||||
#if !defined(__KERNEL__) || defined(CONFIG_BUILD_FLAT)
|
||||
int system(FAR const char *cmd);
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user