diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2016-09-24 21:10:12 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2016-09-24 21:10:45 -0700 |
commit | 85854baba34817be27d9ad3b6c013fde9fb08236 (patch) | |
tree | 8eb7d474e4ffc786a172894933446d4234ef1a05 /m4/nproc.m4 | |
parent | fce9b3f0e2b98e386ca881a0961ca03e86ce73c8 (diff) | |
download | gnulib-85854baba34817be27d9ad3b6c013fde9fb08236.tar.gz |
sched: port to GCC 6.2.1 on macOS Sierra
Problem reported by Denis Davydov in:
http://lists.gnu.org/archive/html/bug-gnulib/2016-09/msg00056.html
* lib/sched.in.h [HAVE_SYS_CDEFS_H]:
Include <sys/cdefs.h> before <sched.h>.
* m4/nproc.m4 (gl_PREREQ_NPROC): Include errno.h before sched.h,
so that we needn’t worry about the sched.h include bug here.
* m4/sched_h.m4 (gl_SCHED_H): Check for sys/cdefs.h,
and include it before <sched.h> if it exists, when
checking for <sched.h>.
Diffstat (limited to 'm4/nproc.m4')
-rw-r--r-- | m4/nproc.m4 | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/m4/nproc.m4 b/m4/nproc.m4 index fead2346b2..f38591bbf3 100644 --- a/m4/nproc.m4 +++ b/m4/nproc.m4 @@ -1,4 +1,4 @@ -# nproc.m4 serial 4 +# nproc.m4 serial 5 dnl Copyright (C) 2009-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -40,7 +40,8 @@ AC_DEFUN([gl_PREREQ_NPROC], [gl_cv_func_sched_getaffinity3], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( - [[#include <sched.h>]], + [[#include <errno.h> + #include <sched.h>]], [[sched_getaffinity (0, 0, (cpu_set_t *) 0);]])], [gl_cv_func_sched_getaffinity3=yes], [gl_cv_func_sched_getaffinity3=no]) |