Skip to content

Commit 19d3143

Browse files
tvlooyweltling
authored andcommitted
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.
1 parent c5ab916 commit 19d3143

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/standard/hrtime.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
#define PHP_HRTIME_PLATFORM_HPUX 0
2929
#define PHP_HRTIME_PLATFORM_AIX 0
3030

31-
#if defined(_POSIX_TIMERS) && (_POSIX_TIMERS > 0) && defined(_POSIX_MONOTONIC_CLOCK) && defined(CLOCK_MONOTONIC)
31+
#if defined(_POSIX_TIMERS) && ((_POSIX_TIMERS > 0) || defined(__OpenBSD__)) && defined(_POSIX_MONOTONIC_CLOCK) && defined(CLOCK_MONOTONIC)
3232
# undef PHP_HRTIME_PLATFORM_POSIX
3333
# define PHP_HRTIME_PLATFORM_POSIX 1
3434
#elif defined(_WIN32) || defined(_WIN64)

0 commit comments

Comments
 (0)