Include <sched.h> in `posix.c'.
authorLudovic Courtès <ludo@gnu.org>
Thu, 14 Apr 2011 21:16:21 +0000 (23:16 +0200)
committerLudovic Courtès <ludo@gnu.org>
Thu, 14 Apr 2011 21:16:21 +0000 (23:16 +0200)
* configure.ac: Check for <sched.h>.

* libguile/posix.c [HAVE_SCHED_H]: Include <sched.h>, for
  `sched_setaffinity' & co.
  Reported by Marco Maggi <marco.maggi-ipsu@poste.it>.

configure.ac
libguile/posix.c

index 45438c8a1845459790daf137093d585906284280..2b5662997fc21dbab5a7b90afac6729429c3564d 100644 (file)
@@ -644,12 +644,13 @@ AC_SUBST([SCM_I_GSC_HAVE_STRUCT_DIRENT64])
 #     this file instead of <fenv.h>
 #   process.h - mingw specific
 #   langinfo.h, nl_types.h - SuS v2
+#   sched.h - missing on MinGW
 #
 AC_CHECK_HEADERS([complex.h fenv.h io.h libc.h limits.h malloc.h memory.h process.h string.h \
 regex.h rxposix.h rx/rxposix.h sys/dir.h sys/ioctl.h sys/select.h \
 sys/time.h sys/timeb.h sys/times.h sys/stdtypes.h sys/types.h \
 sys/utime.h time.h unistd.h utime.h pwd.h grp.h sys/utsname.h \
-direct.h langinfo.h nl_types.h machine/fpu.h poll.h])
+direct.h langinfo.h nl_types.h machine/fpu.h poll.h sched.h])
 
 # Reasons for testing:
 #   nl_item - lacking on Cygwin
index a5c72624c7b22bce3a64b7f373e5e2647b590105..422aadbe5d7397555e5778a8a6ba121401f1a269 100644 (file)
 #include <errno.h>
 #include <uniconv.h>
 
+#ifdef HAVE_SCHED_H
+# include <sched.h>
+#endif
+
 #include "libguile/_scm.h"
 #include "libguile/dynwind.h"
 #include "libguile/fports.h"