From 12f4f4dc86791d9446b58b399d5b41cf8ee3cb86 Mon Sep 17 00:00:00 2001 From: Wojciech Sipak Date: Tue, 12 Dec 2023 15:32:59 +0100 Subject: [PATCH] samples: hello_world_user: fail in compilation if userspace is not enabled The sample depends on CONFIG_USERSPACE. Signed-off-by: Wojciech Sipak --- samples/userspace/hello_world_user/src/main.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/samples/userspace/hello_world_user/src/main.c b/samples/userspace/hello_world_user/src/main.c index 0a2b724117e..3223d4a1a27 100644 --- a/samples/userspace/hello_world_user/src/main.c +++ b/samples/userspace/hello_world_user/src/main.c @@ -8,6 +8,10 @@ #include #define USER_STACKSIZE 2048 +#ifndef CONFIG_USERSPACE +#error This sample requires CONFIG_USERSPACE. +#endif + struct k_thread user_thread; K_THREAD_STACK_DEFINE(user_stack, USER_STACKSIZE);