From 6bf6ca499c08f49ad4879f5c658265f1df6e5b27 Mon Sep 17 00:00:00 2001 From: Hans de Graaff Date: Sun, 5 Jan 2025 09:02:07 +0100 Subject: dev-lang/ruby: fix pointer incompatibility on 32-bit 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 --- .../3.2/014-time-pointer-incompatibility.patch | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 dev-lang/ruby/files/3.2/014-time-pointer-incompatibility.patch (limited to 'dev-lang/ruby/files/3.2/014-time-pointer-incompatibility.patch') diff --git a/dev-lang/ruby/files/3.2/014-time-pointer-incompatibility.patch b/dev-lang/ruby/files/3.2/014-time-pointer-incompatibility.patch new file mode 100644 index 000000000000..5363049b72aa --- /dev/null +++ b/dev-lang/ruby/files/3.2/014-time-pointer-incompatibility.patch @@ -0,0 +1,28 @@ +From 59254caff0f39c87370d0c11793e3aae5c38d6e1 Mon Sep 17 00:00:00 2001 +From: nagachika +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; -- cgit v1.2.3