mirror of
https://anongit.gentoo.org/git/repo/gentoo.git
synced 2025-07-22 06:57:59 +02:00
Apply upstream patch to fix this issue. This was already fixed in newer ruby versions. Closes: https://bugs.gentoo.org/932841 Signed-off-by: Hans de Graaff <graaff@gentoo.org>
28 lines
913 B
Diff
28 lines
913 B
Diff
From 59254caff0f39c87370d0c11793e3aae5c38d6e1 Mon Sep 17 00:00:00 2001
|
|
From: nagachika <nagachika@ruby-lang.org>
|
|
Date: Sun, 15 Dec 2024 15:31:58 +0900
|
|
Subject: [PATCH] merge revision(s) 055613fd868a8c94e43893f8c58a00cdd2a81f6d:
|
|
[Backport #20447]
|
|
|
|
Fix pointer incompatiblity
|
|
|
|
Since the subsecond part is discarded, WIDEVAL to VALUE conversion is
|
|
needed.
|
|
---
|
|
time.c | 2 +-
|
|
version.h | 2 +-
|
|
2 files changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/time.c b/time.c
|
|
index 7f859d5eb40acc..04f6f2afc5f28c 100644
|
|
--- a/time.c
|
|
+++ b/time.c
|
|
@@ -2322,7 +2322,7 @@ zone_timelocal(VALUE zone, VALUE time)
|
|
struct time_object *tobj = DATA_PTR(time);
|
|
wideval_t t, s;
|
|
|
|
- split_second(tobj->timew, &t, &s);
|
|
+ wdivmod(tobj->timew, WINT2FIXWV(TIME_SCALE), &t, &s);
|
|
tm = tm_from_time(rb_cTimeTM, time);
|
|
utc = rb_check_funcall(zone, id_local_to_utc, 1, &tm);
|
|
if (UNDEF_P(utc)) return 0;
|