From: David Carlier Date: Wed, 17 Jun 2020 21:16:29 +0000 (+0000) Subject: Fix Haiku build X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bb61346580242a175c6f771b79f9722405970da1;p=php Fix Haiku build getrusage supports only two fields. The network api sits in the network lib. Closes GH-5732. --- diff --git a/configure.ac b/configure.ac index ded516b01f..e830acfb25 100644 --- a/configure.ac +++ b/configure.ac @@ -601,6 +601,9 @@ AX_FUNC_WHICH_GETHOSTBYNAME_R 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, diff --git a/ext/opcache/jit/zend_jit_perf_dump.c b/ext/opcache/jit/zend_jit_perf_dump.c index 663f9ae1e0..e61c492895 100644 --- a/ext/opcache/jit/zend_jit_perf_dump.c +++ b/ext/opcache/jit/zend_jit_perf_dump.c @@ -22,9 +22,10 @@ #include #include #include -#include -#if defined(__darwin__) +#if defined(__linux__) +#include +#elif defined(__darwin__) # include #elif defined(__FreeBSD__) # include diff --git a/ext/standard/microtime.c b/ext/standard/microtime.c index b33face760..fe18e9b92a 100644 --- a/ext/standard/microtime.c +++ b/ext/standard/microtime.c @@ -128,7 +128,7 @@ PHP_FUNCTION(getrusage) #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); diff --git a/sapi/phpdbg/phpdbg.c b/sapi/phpdbg/phpdbg.c index ea0653fd25..f978c21ea3 100644 --- a/sapi/phpdbg/phpdbg.c +++ b/sapi/phpdbg/phpdbg.c @@ -1683,6 +1683,9 @@ phpdbg_main: } #ifndef _WIN32 +# ifndef SIGIO +# define SIGIO SIGPOLL +# endif zend_sigaction(SIGIO, &sigio_struct, NULL); #endif