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>
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
* 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"