Skip to content

Commit bb61346

Browse files
devnexennikic
authored andcommitted
Fix Haiku build
getrusage supports only two fields. The network api sits in the network lib. Closes GH-5732.
1 parent ca48129 commit bb61346

File tree

4 files changed

+10
-3
lines changed

4 files changed

+10
-3
lines changed

configure.ac

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -601,6 +601,9 @@ AX_FUNC_WHICH_GETHOSTBYNAME_R
601601
dnl Some systems (like OpenSolaris) do not have nanosleep in libc.
602602
PHP_CHECK_FUNC_LIB(nanosleep, rt)
603603

604+
dnl Haiku does not have network api in libc.
605+
PHP_CHECK_FUNC_LIB(setsockopt, network)
606+
604607
dnl Check for getaddrinfo, should be a better way, but... Also check for working
605608
dnl getaddrinfo.
606609
AC_CACHE_CHECK([for getaddrinfo], ac_cv_func_getaddrinfo,

ext/opcache/jit/zend_jit_perf_dump.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,10 @@
2222
#include <unistd.h>
2323
#include <time.h>
2424
#include <sys/mman.h>
25-
#include <sys/syscall.h>
2625

27-
#if defined(__darwin__)
26+
#if defined(__linux__)
27+
#include <sys/syscall.h>
28+
#elif defined(__darwin__)
2829
# include <pthread.h>
2930
#elif defined(__FreeBSD__)
3031
# include <sys/thr.h>

ext/standard/microtime.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ PHP_FUNCTION(getrusage)
128128
#ifdef PHP_WIN32 /* Windows only implements a limited amount of fields from the rusage struct */
129129
PHP_RUSAGE_PARA(ru_majflt);
130130
PHP_RUSAGE_PARA(ru_maxrss);
131-
#elif !defined(_OSD_POSIX)
131+
#elif !defined(_OSD_POSIX) && !defined(__HAIKU__)
132132
PHP_RUSAGE_PARA(ru_oublock);
133133
PHP_RUSAGE_PARA(ru_inblock);
134134
PHP_RUSAGE_PARA(ru_msgsnd);

sapi/phpdbg/phpdbg.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1683,6 +1683,9 @@ int main(int argc, char **argv) /* {{{ */
16831683
}
16841684

16851685
#ifndef _WIN32
1686+
# ifndef SIGIO
1687+
# define SIGIO SIGPOLL
1688+
# endif
16861689
zend_sigaction(SIGIO, &sigio_struct, NULL);
16871690
#endif
16881691

0 commit comments

Comments
 (0)