From 58990c4d3a94334bcf1cd4f8dd7c2ba2888263e1 Mon Sep 17 00:00:00 2001 From: Iain Buclaw Date: Wed, 24 Apr 2019 18:57:36 +0000 Subject: libphobos: Fix FAIL phobos.exp/core.time on CentOS 5.11, Linux 2.6.18 Merges upstream druntime e03164b5. Reviewed-on: https://github.com/dlang/druntime/pull/2581 libphobos/ChangeLog: 2019-04-24 Iain Buclaw PR d/89432 * testsuite/lib/libphobos.exp (check_effective_target_linux_pre_2639): New proc. * testsuite/libphobos.druntime/druntime.exp: Add compiler flag -fversion=Linux_Pre_2639 if target is linux_pre_2639. * testsuite/libphobos.druntime_shared/druntime_shared.exp: Likewise. From-SVN: r270554 --- libphobos/libdruntime/MERGE | 2 +- libphobos/libdruntime/core/time.d | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'libphobos/libdruntime') diff --git a/libphobos/libdruntime/MERGE b/libphobos/libdruntime/MERGE index 9fe51fd..d815647 100644 --- a/libphobos/libdruntime/MERGE +++ b/libphobos/libdruntime/MERGE @@ -1,4 +1,4 @@ -513652173d6f02206be3ddaa2b6ed0b191ea4e3d +e03164b5259a9f116eb91dfa5a18c192fa72e575 The first line of this file holds the git revision number of the last merge done from the dlang/druntime repository. diff --git a/libphobos/libdruntime/core/time.d b/libphobos/libdruntime/core/time.d index 1982122..a7640ec 100644 --- a/libphobos/libdruntime/core/time.d +++ b/libphobos/libdruntime/core/time.d @@ -2539,8 +2539,11 @@ unittest static bool clockSupported(ClockType c) { - version (Linux_Pre_2639) // skip CLOCK_BOOTTIME on older linux kernels - return c != ClockType.second && c != ClockType.bootTime; + // Skip unsupported clocks on older linux kernels, assume that only + // CLOCK_MONOTONIC and CLOCK_REALTIME exist, as that is the lowest + // common denominator supported by all versions of Linux pre-2.6.12. + version (Linux_Pre_2639) + return c == ClockType.normal || c == ClockType.precise; else return c != ClockType.second; // second doesn't work with MonoTimeImpl -- cgit v1.1