From: Svante Signell Date: Tue, 16 Feb 2021 18:37:13 +0000 (+0100) Subject: Don't use hrtimers on GNU Hurd X-Git-Tag: archive/raspbian/8.2.18-1+rpi1^2~11 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=ca49380e6518374765ecf539ba38c762b389521f;p=php8.2.git 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 --- 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)