mirror of
https://github.com/apache/nuttx.git
synced 2026-06-02 01:08:56 +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
+1
-1
@@ -183,7 +183,7 @@ void _Exit(int status) noreturn_function;
|
|||||||
* standards compatibility.
|
* standards compatibility.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __KERNEL__
|
#if !defined(__KERNEL__) || defined(CONFIG_BUILD_FLAT)
|
||||||
int system(FAR const char *cmd);
|
int system(FAR const char *cmd);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user