getrusage supports only two fields. The network api sits in the network lib.
Closes GH-5732.
dnl Some systems (like OpenSolaris) do not have nanosleep in libc.
PHP_CHECK_FUNC_LIB(nanosleep, rt)
+dnl Haiku does not have network api in libc.
+PHP_CHECK_FUNC_LIB(setsockopt, network)
+
dnl Check for getaddrinfo, should be a better way, but... Also check for working
dnl getaddrinfo.
AC_CACHE_CHECK([for getaddrinfo], ac_cv_func_getaddrinfo,
#include <unistd.h>
#include <time.h>
#include <sys/mman.h>
-#include <sys/syscall.h>
-#if defined(__darwin__)
+#if defined(__linux__)
+#include <sys/syscall.h>
+#elif defined(__darwin__)
# include <pthread.h>
#elif defined(__FreeBSD__)
# include <sys/thr.h>
#ifdef PHP_WIN32 /* Windows only implements a limited amount of fields from the rusage struct */
PHP_RUSAGE_PARA(ru_majflt);
PHP_RUSAGE_PARA(ru_maxrss);
-#elif !defined(_OSD_POSIX)
+#elif !defined(_OSD_POSIX) && !defined(__HAIKU__)
PHP_RUSAGE_PARA(ru_oublock);
PHP_RUSAGE_PARA(ru_inblock);
PHP_RUSAGE_PARA(ru_msgsnd);
}
#ifndef _WIN32
+# ifndef SIGIO
+# define SIGIO SIGPOLL
+# endif
zend_sigaction(SIGIO, &sigio_struct, NULL);
#endif