include linux/sched.h to compile on systems with older libc

This commit is contained in:
Nikos Mavrogiannopoulos
2015-01-15 09:55:51 +01:00
parent 8b65df1ce3
commit 65a4646d2f
2 changed files with 3 additions and 1 deletions

View File

@@ -286,7 +286,8 @@ if [ test "$linux_ns_enabled" = "yes" ];then
AC_MSG_CHECKING([for Linux namespaces])
dnl We use Linux namespaces only in the platforms clone() works as expected
AC_LINK_IFELSE([AC_LANG_PROGRAM([
#include <sched.h>],[
#include <sched.h>
#include <linux/sched.h>],[
#if defined(__i386__) || defined(__arm__) || defined(__x86_64__) || defined(__mips__)
unshare(CLONE_NEWPID|CLONE_NEWIPC);
#else

View File

@@ -22,6 +22,7 @@
#ifdef __linux__
# include <sys/prctl.h>
# include <sched.h>
# include <linux/sched.h>
# include <sys/syscall.h>
#endif
#include <sys/types.h>