Commit 4200d42e authored by Alexander Kartashov's avatar Alexander Kartashov Committed by Pavel Emelyanov

session02: hard-code the value of the macro CLONE_STACK_SIZE

The macro PAGE_SIZE is declared in the following way in Debian:

 #define PAGE_SIZE               (sysconf(_SC_PAGESIZE))

that makes it impossible to use the macro as the size of
the array clone_args::stack since this generates the following error:

cc -g -O2 -Wall -Werror -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0 -iquote ../../lib/arch/arm/include -I../../lib   session02.c ../../lib/libzdtmtst.a   -o session02
session02.c:70:7: error: variably modified 'stack' at file scope

Cc: Andrey Vagin <avagin@openvz.org>
Signed-off-by: 's avatarAlexander Kartashov <alekskartashov@parallels.com>
Acked-by: 's avatarAndrew Vagin <avagin@parallels.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 3ca29f70
...@@ -64,7 +64,7 @@ static void mainloop() ...@@ -64,7 +64,7 @@ static void mainloop()
handle_command(); handle_command();
} }
#define CLONE_STACK_SIZE PAGE_SIZE #define CLONE_STACK_SIZE 4096
/* All arguments should be above stack, because it grows down */ /* All arguments should be above stack, because it grows down */
struct clone_args { struct clone_args {
char stack[CLONE_STACK_SIZE]; char stack[CLONE_STACK_SIZE];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment