From 7667956e6c37b12cc226c2faa776103baca74be3 Mon Sep 17 00:00:00 2001 From: Eric Snow Date: Thu, 8 Dec 2022 17:47:37 -0700 Subject: [PATCH] Also define check_ticks_per_second() if HAVE_CLOCK is defined. --- Modules/timemodule.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Modules/timemodule.c b/Modules/timemodule.c index ba4128c0fdf5b6..c2bacaae0c0339 100644 --- a/Modules/timemodule.c +++ b/Modules/timemodule.c @@ -62,8 +62,7 @@ #define SEC_TO_NS (1000 * 1000 * 1000) -#ifdef HAVE_TIMES - +#if defined(HAVE_TIMES) || defined(HAVE_CLOCK) static int check_ticks_per_second(long tps, const char *context) { @@ -75,6 +74,9 @@ check_ticks_per_second(long tps, const char *context) } return 0; } +#endif /* HAVE_TIMES || HAVE_CLOCK */ + +#ifdef HAVE_TIMES # define ticks_per_second _PyRuntime.time.ticks_per_second