]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
Add signalfd function definition
authordlezcano <dlezcano>
Mon, 2 Feb 2009 14:50:00 +0000 (14:50 +0000)
committerdlezcano <dlezcano>
Mon, 2 Feb 2009 14:50:00 +0000 (14:50 +0000)
From: Dietmar Maurer <dietmar@proxmox.com>

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 <dietmar@proxmox.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
configure.in
src/lxc/start.c

index 1a0df21c352e1d79796557db5dcd17368c758286..79f3c17bb3ed06354312b4f19268bae3579af23a 100644 (file)
@@ -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 <sys/capability.h>])
 
+AC_CHECK_HEADERS([sys/signalfd.h])
+
 AC_PROG_GCC_TRADITIONAL
 
 if test "x$GCC" = "xyes"; then
index b7e5870004118bba655d0af22103bbc50070aeb8..e0c381bc7d614ef6abd6b9f1c8e92de92afd57c5 100644 (file)
@@ -21,7 +21,7 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  */
 
-#define _GNU_SOURCE
+#include "../config.h"
 #include <stdio.h>
 #undef _GNU_SOURCE
 #include <string.h>
 #include <sys/wait.h>
 #include <sys/un.h>
 #include <sys/poll.h>
+
+#ifdef HAVE_SYS_SIGNALFD_H 
 #include <sys/signalfd.h>
+#else
+extern int signalfd (int fd, const sigset_t *mask, int flags);
+#endif
 
 #include "error.h"
 #include "af_unix.h"