- This is important on aarch64, which requires 16-byte aligned
stack pointer. This might be relevant on other arches as well,
I suspect we just happened to get the 16-byte boundary in some
cases.
#include <sys/types.h>
#include <stdlib.h>
#include <sched.h>
+#include <unistd.h>
int child ()
{
int main ()
{
pid_t pid;
- static char stack[STACK_SIZE];
+ static __attribute__ ((aligned (16))) char stack[STACK_SIZE];
+
#ifdef __ia64__
pid = __clone2((myfunc)&child, stack, STACK_SIZE, CLONE_FS, NULL);
#else