From ff218c25daab9a6d98a499d0c2ea1dcb5b5d0272 Mon Sep 17 00:00:00 2001 From: dlezcano Date: Mon, 2 Feb 2009 14:50:00 +0000 Subject: [PATCH] Add signalfd function definition From: Dietmar Maurer The signalfd function prototype and the signalfd header file is not defined in the debian Lenny. We want to use this debian version with a newer kernel. This patch gives the signalfd function prototype, because the function is available in the glibc-2.7 which is the version coming with debian Lenny. Signed-off-by: Dietmar Maurer Signed-off-by: Daniel Lezcano --- configure.in | 2 ++ src/lxc/start.c | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) 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" -- 2.47.2