From d475b7a946a69866ea95873fd813668abceeb33d Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Sun, 8 Jan 2017 23:45:58 +0100 Subject: [PATCH] Fix scm_init_stime for macOS * libguile/stime.c (scm_init_stime): Remove needless test of clock_getcpuclockid. Fixes build on macOS; thanks to Matt Wette for the report and fix. --- libguile/stime.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/libguile/stime.c b/libguile/stime.c index a5421d716..7a139747f 100644 --- a/libguile/stime.c +++ b/libguile/stime.c @@ -830,12 +830,7 @@ scm_init_stime() #ifdef HAVE_POSIX_CPUTIME { - clockid_t dummy; - - /* Only use the _POSIX_CPUTIME clock if it's going to work across - CPUs. */ - if (clock_getcpuclockid (0, &dummy) == 0 && - clock_gettime (CLOCK_PROCESS_CPUTIME_ID, &posix_run_time_base) == 0) + if (clock_gettime (CLOCK_PROCESS_CPUTIME_ID, &posix_run_time_base) == 0) get_internal_run_time = get_internal_run_time_posix_timer; else errno = 0;