/* Affinity tests.
- Copyright (C) 2013 Free Software Foundation, Inc.
+ Copyright (C) 2013-2020 Free Software Foundation, Inc.
GCC is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
#define _GNU_SOURCE
#endif
#include "config.h"
-#include <alloca.h>
#include <omp.h>
#include <stdio.h>
#include <stdlib.h>
#ifdef DO_FORK
#include <signal.h>
+#include <sys/wait.h>
#endif
#ifdef HAVE_PTHREAD_AFFINITY_NP
#include <sched.h>
size = sizeof (cpu_set_t);
}
}
- cpu_set_t *cpusetp = (cpu_set_t *) alloca (size);
+ cpu_set_t *cpusetp = (cpu_set_t *) __builtin_alloca (size);
if (pthread_getaffinity_np (pthread_self (), size, cpusetp) == 0)
{
unsigned long i, len, max = 8 * size;