aboutsummaryrefslogtreecommitdiffstats
path: root/process.c
diff options
context:
space:
mode:
authorBo Anderson <mail@boanderson.me>2023-08-21 18:02:29 +0100
committerNobuyoshi Nakada <nobu@ruby-lang.org>2023-08-24 19:09:06 +0900
commit84a12d657848dfb54f8cc556d344f017a793e95a (patch)
tree9706ad01fb343ef5759761697a5dd73001fc49d4 /process.c
parentfbe7962b54096d52d15d31756db80cf5cca5ea98 (diff)
downloadruby-84a12d657848dfb54f8cc556d344f017a793e95a.tar.gz
Fix compile error on older systems without clock_get*
Diffstat (limited to 'process.c')
-rw-r--r--process.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/process.c b/process.c
index 930a96d3f4..bffae8eae9 100644
--- a/process.c
+++ b/process.c
@@ -8189,7 +8189,9 @@ rb_clock_gettime(int argc, VALUE *argv, VALUE _)
VALUE unit = (rb_check_arity(argc, 1, 2) == 2) ? argv[1] : Qnil;
VALUE clk_id = argv[0];
+#ifdef HAVE_CLOCK_GETTIME
clockid_t c;
+#endif
if (SYMBOL_P(clk_id)) {
#ifdef CLOCK_REALTIME
@@ -8417,7 +8419,9 @@ rb_clock_getres(int argc, VALUE *argv, VALUE _)
timetick_int_t denominators[2];
int num_numerators = 0;
int num_denominators = 0;
+#ifdef HAVE_CLOCK_GETRES
clockid_t c;
+#endif
VALUE unit = (rb_check_arity(argc, 1, 2) == 2) ? argv[1] : Qnil;
VALUE clk_id = argv[0];