Browse Source

Add dummy function for Kevent support

develop
Damien Goutte-Gattat 9 years ago
parent
commit
ef142b81bc
  1. 2
      configure.ac
  2. 14
      src/wait4pid.c

2
configure.ac

@ -22,6 +22,8 @@ dnl Check for possible mechanism, default is kill
backend="kill"
AC_CHECK_HEADERS([linux/netlink.h],
[backend=Netlink])
AC_CHECK_HEADERS([sys/event.h],
[backend=Kevent])
AM_CONDITIONAL([HAVE_NETLINK], [test x$ac_cv_header_linux_netlink_h = xyes])
dnl Output files

14
src/wait4pid.c

@ -20,7 +20,7 @@
#include <config.h>
#endif
#ifdef HAVE_LINUX_NETLINK_H
#if defined HAVE_LINUX_NETLINK_H /* Netlink */
#include <string.h>
#include <unistd.h>
@ -168,7 +168,15 @@ wait4all(pid_t *pids, size_t len)
return ec;
}
#else /* HAVE_LINUX_NETLINK_H */
#elif defined HAVE_SYS_EVENT_H /* BSD Kevent */
int
wait4all(pid_t *pids, size_t len)
{
return 0;
}
#else /* Fallback */
#include <time.h>
#include <signal.h>
@ -197,4 +205,4 @@ wait4all(pid_t *pids, size_t len)
return 0;
}
#endif /* ! HAVE_LINUX_NETLINK_H */
#endif

Loading…
Cancel
Save