From fefdd3fe4bf6eedc2ef1049fc832d081a353072c Mon Sep 17 00:00:00 2001 From: Svante Signell Date: Tue, 16 Feb 2021 19:37:13 +0100 Subject: [PATCH] Don't use hrtimers on GNU Hurd This patch solves the build error: PHP Warning: PHP Startup: Failed to initialize high-resolution timer in Unknown on line 0. Gbp-Pq: Name 0037-Don-t-use-hrtimers-on-GNU-Hurd.patch --- ext/standard/hrtime.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ext/standard/hrtime.h b/ext/standard/hrtime.h index 0aa39f0a..89bf810f 100644 --- a/ext/standard/hrtime.h +++ b/ext/standard/hrtime.h @@ -24,7 +24,10 @@ #define PHP_HRTIME_PLATFORM_HPUX 0 #define PHP_HRTIME_PLATFORM_AIX 0 -#if defined(_POSIX_TIMERS) && ((_POSIX_TIMERS > 0) || defined(__OpenBSD__)) && defined(_POSIX_MONOTONIC_CLOCK) && defined(CLOCK_MONOTONIC) +#if defined(_POSIX_TIMERS) && \ + ((_POSIX_TIMERS > 0) || defined(__OpenBSD__) || defined(__GNU__)) && \ + defined(_POSIX_MONOTONIC_CLOCK) && \ + defined(CLOCK_MONOTONIC) # undef PHP_HRTIME_PLATFORM_POSIX # define PHP_HRTIME_PLATFORM_POSIX 1 #elif defined(_WIN32) || defined(_WIN64) -- 2.30.2