diff options
| author | Hans de Graaff <graaff@gentoo.org> | 2025-01-05 09:02:07 +0100 |
|---|---|---|
| committer | Hans de Graaff <graaff@gentoo.org> | 2025-01-05 09:02:07 +0100 |
| commit | 6bf6ca499c08f49ad4879f5c658265f1df6e5b27 (patch) | |
| tree | 05acc1c0a9695ff0e86fa009a807996192135c6d /dev-lang/ruby/files/3.2/014-time-pointer-incompatibility.patch | |
| parent | 8c58e3e8e71e17c9f88279a49c34d4e94b37b50c (diff) | |
| download | gentoo-6bf6ca499c08f49ad4879f5c658265f1df6e5b27.tar.gz gentoo-6bf6ca499c08f49ad4879f5c658265f1df6e5b27.tar.bz2 gentoo-6bf6ca499c08f49ad4879f5c658265f1df6e5b27.zip | |
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 <graaff@gentoo.org>
Diffstat (limited to 'dev-lang/ruby/files/3.2/014-time-pointer-incompatibility.patch')
| -rw-r--r-- | dev-lang/ruby/files/3.2/014-time-pointer-incompatibility.patch | 28 |
1 files changed, 28 insertions, 0 deletions
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 <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; |
