diff options
Diffstat (limited to 'apps/examples/ostest/vfork.c')
-rw-r--r-- | apps/examples/ostest/vfork.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/apps/examples/ostest/vfork.c b/apps/examples/ostest/vfork.c index 4e1b8c892..fd99d1aea 100644 --- a/apps/examples/ostest/vfork.c +++ b/apps/examples/ostest/vfork.c @@ -47,6 +47,9 @@ #include "ostest.h" +#if defined(CONFIG_ARCH_HAVE_VFORK) && defined(CONFIG_SCHED_WAITPID) && \ + !defined(CONFIG_DISABLE_SIGNALS) + /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ @@ -55,9 +58,7 @@ * Private Data ****************************************************************************/ -#if defined(CONFIG_ARCH_HAVE_VFORK) && !defined(CONFIG_DISABLE_SIGNALS) static volatile bool g_vforkchild; -#endif /**************************************************************************** * Public Functions @@ -65,7 +66,6 @@ static volatile bool g_vforkchild; int vfork_test(void) { -#if defined(CONFIG_ARCH_HAVE_VFORK) && !defined(CONFIG_DISABLE_SIGNALS) pid_t pid; g_vforkchild = false; @@ -97,7 +97,8 @@ int vfork_test(void) return -1; } } -#endif return 0; } + +#endif /* CONFIG_ARCH_HAVE_VFORK && CONFIG_SCHED_WAITPID && !CONFIG_DISABLE_SIGNALS */ |