1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-07-03 08:10:31 +02:00

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.
This commit is contained in:
Andy Wingo 2017-01-08 23:45:58 +01:00
parent 535261ba9f
commit d475b7a946

View file

@ -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;