]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libgomp/testsuite/libgomp.c/affinity-1.c
Update copyright years.
[thirdparty/gcc.git] / libgomp / testsuite / libgomp.c / affinity-1.c
index 5d3e45d1df9b7667935e72e42867f35fa268ccc6..aeb0f4d5defce92cffe74aeedb30142e8623b295 100644 (file)
@@ -1,5 +1,5 @@
 /* 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
@@ -23,7 +23,6 @@
 #define _GNU_SOURCE
 #endif
 #include "config.h"
-#include <alloca.h>
 #include <omp.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -32,6 +31,7 @@
 
 #ifdef DO_FORK
 #include <signal.h>
+#include <sys/wait.h>
 #endif
 #ifdef HAVE_PTHREAD_AFFINITY_NP
 #include <sched.h>
@@ -117,7 +117,7 @@ print_affinity (struct place p)
            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;