diff --git a/src/platform_linux.cc b/src/platform_linux.cc index ae281606c02..287ed3e306c 100644 --- a/src/platform_linux.cc +++ b/src/platform_linux.cc @@ -42,8 +42,10 @@ #include #include -#if HAVE_MONOTONIC_CLOCK #include + +#ifndef CLOCK_MONOTONIC +# include #endif extern char **environ; @@ -296,7 +298,7 @@ int Platform::GetCPUInfo(Local *cpus) { } double Platform::GetUptimeImpl() { -#if HAVE_MONOTONIC_CLOCK +#ifdef CLOCK_MONOTONIC struct timespec now; if (0 == clock_gettime(CLOCK_MONOTONIC, &now)) { double uptime = now.tv_sec; diff --git a/wscript b/wscript index 7457339aa13..006b0d95ead 100644 --- a/wscript +++ b/wscript @@ -380,23 +380,6 @@ def configure(conf): have_librt = conf.check(lib='rt', uselib_store='RT') - have_monotonic = False - if have_librt: - code = """ - #include - int main(void) { - struct timespec now; - clock_gettime(CLOCK_MONOTONIC, &now); - return 0; - } - """ - have_monotonic = conf.check_cc(lib="rt", msg="Checking for CLOCK_MONOTONIC", fragment=code) - - if have_monotonic: - conf.env.append_value('CPPFLAGS', '-DHAVE_MONOTONIC_CLOCK=1') - else: - conf.env.append_value('CPPFLAGS', '-DHAVE_MONOTONIC_CLOCK=0') - if sys.platform.startswith("sunos"): code = """ #include