diff --git a/configure.in b/configure.in index 1a0df21c3..79f3c17bb 100644 --- a/configure.in +++ b/configure.in @@ -27,6 +27,8 @@ AC_CHECK_HEADERS([linux/netlink.h linux/genetlink.h], [], AC_MSG_ERROR([netlink AC_CHECK_HEADERS([sys/capability.h], [], AC_MSG_ERROR([please install libcap-devel.]), [#include ]) +AC_CHECK_HEADERS([sys/signalfd.h]) + AC_PROG_GCC_TRADITIONAL if test "x$GCC" = "xyes"; then diff --git a/src/lxc/start.c b/src/lxc/start.c index b7e587000..e0c381bc7 100644 --- a/src/lxc/start.c +++ b/src/lxc/start.c @@ -21,7 +21,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#define _GNU_SOURCE +#include "../config.h" #include #undef _GNU_SOURCE #include @@ -41,7 +41,12 @@ #include #include #include + +#ifdef HAVE_SYS_SIGNALFD_H #include +#else +extern int signalfd (int fd, const sigset_t *mask, int flags); +#endif #include "error.h" #include "af_unix.h"