com php-src: Enable HRTime on OpenBSD: ext/standard/hrtime.h

From: Date: Tue, 12 Jun 2018 10:27:48 +0000
Subject: com php-src: Enable HRTime on OpenBSD: ext/standard/hrtime.h
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-102128@lists.php.net to get a copy of this message
Commit: 19d31433dcb2fd3aa6148cb3f6cffe4b73b54523 Author: Tom Van Looy <tom@ctors.net> Fri, 8 Jun 2018 23:17:34 +0200 Committer: Anatol Belski <ab@php.net> Tue, 12 Jun 2018 12:27:48 +0200 Parents: c5ab9169cefdc0d95b17a06ed7d924009f9886da Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=19d31433dcb2fd3aa6148cb3f6cffe4b73b54523 Log: Enable HRTime on OpenBSD OpenBSD has clock_gettime() so this will work. They have _POSIX_TIMERS on -1 in unistd because they don't have per-process timers. Changed paths: M ext/standard/hrtime.h Diff: diff --git a/ext/standard/hrtime.h b/ext/standard/hrtime.h index 17a1576..18c5e98 100644 --- a/ext/standard/hrtime.h +++ b/ext/standard/hrtime.h @@ -28,7 +28,7 @@ #define PHP_HRTIME_PLATFORM_HPUX 0 #define PHP_HRTIME_PLATFORM_AIX 0 -#if defined(_POSIX_TIMERS) && (_POSIX_TIMERS > 0) && defined(_POSIX_MONOTONIC_CLOCK) && defined(CLOCK_MONOTONIC) +#if defined(_POSIX_TIMERS) && ((_POSIX_TIMERS > 0) || defined(__OpenBSD__)) && defined(_POSIX_MONOTONIC_CLOCK) && defined(CLOCK_MONOTONIC) # undef PHP_HRTIME_PLATFORM_POSIX # define PHP_HRTIME_PLATFORM_POSIX 1 #elif defined(_WIN32) || defined(_WIN64)

« previous php.cvs (#102128) next »