diff options
| author | Bo Anderson <mail@boanderson.me> | 2023-11-21 13:04:00 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-11-21 13:04:00 +0000 |
| commit | 6ad47f356b8d6cafe2da6306aab801af406ee94e (patch) | |
| tree | 84dd78cc57e91817ae41845f85885849bf8bf88b | |
| parent | ba0de58de3bc891507f2d1dfffbe4ad632fdcd5c (diff) | |
[3.2 backport] Fix compile error on older systems without clock_get* (#8948)
Fix compile error on older systems without clock_get*
| -rw-r--r-- | process.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -8372,7 +8372,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 @@ -8598,7 +8600,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]; |
