From: Hemanth Kumar M D Date: Tue, 19 May 2026 07:25:24 +0000 (-0700) Subject: rxvt-unicode: backport a fix for building with gcc-16 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=99716a635ccbcbcdc18c8ce14e2e96268f3eab4d;p=thirdparty%2Fopenembedded%2Fopenembedded-core.git rxvt-unicode: backport a fix for building with gcc-16 rename lerp to avoid conflict with the non-identical function std::lerp Upstream-Status: Submitted [https://lists.schmorp.de/pipermail/rxvt-unicode/2026q2/002707.html] Signed-off-by: Hemanth Kumar M D Signed-off-by: Antonin Godard Signed-off-by: Richard Purdie --- diff --git a/meta/recipes-sato/rxvt-unicode/rxvt-unicode.inc b/meta/recipes-sato/rxvt-unicode/rxvt-unicode.inc index f8c0d8ab838..80791ca5118 100644 --- a/meta/recipes-sato/rxvt-unicode/rxvt-unicode.inc +++ b/meta/recipes-sato/rxvt-unicode/rxvt-unicode.inc @@ -11,7 +11,8 @@ DEPENDS = "virtual/libx11 libxt libxft gdk-pixbuf libxmu libptytty ncurses-nativ SRC_URI = "http://dist.schmorp.de/rxvt-unicode/Attic/rxvt-unicode-${PV}.tar.bz2 \ file://xwc.patch \ file://rxvt.desktop \ - file://rxvt.png" + file://rxvt.png \ + file://0001-rxvt-unicode-fix-gcc16-c-20.patch" inherit autotools features_check pkgconfig update-alternatives diff --git a/meta/recipes-sato/rxvt-unicode/rxvt-unicode/0001-rxvt-unicode-fix-gcc16-c-20.patch b/meta/recipes-sato/rxvt-unicode/rxvt-unicode/0001-rxvt-unicode-fix-gcc16-c-20.patch new file mode 100644 index 00000000000..facb574a2bb --- /dev/null +++ b/meta/recipes-sato/rxvt-unicode/rxvt-unicode/0001-rxvt-unicode-fix-gcc16-c-20.patch @@ -0,0 +1,61 @@ +From 4ff364c3df99b02e658ac2b3d2eec7139c494612 Mon Sep 17 00:00:00 2001 +From: Hemanth Kumar M D +Date: Tue, 28 Apr 2026 03:22:40 -0700 +Subject: [PATCH] rxvt-unicode: fix gcc16/c++20 + +rename lerp to avoid conflict with the non-identical function std::lerp + +Upstream-Status: Submitted [https://lists.schmorp.de/pipermail/rxvt-unicode/2026q2/002707.html] + +Signed-off-by: Nicolas PARLANT +Signed-off-by: Sam James +Signed-off-by: Hemanth Kumar M D +--- + src/rxvttoolkit.C | 10 +++++----- + src/rxvtutil.h | 2 +- + 2 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/src/rxvttoolkit.C b/src/rxvttoolkit.C +index d92c5b9..343a901 100644 +--- a/src/rxvttoolkit.C ++++ b/src/rxvttoolkit.C +@@ -834,7 +834,7 @@ rxvt_color::set (rxvt_screen *screen, const char *name) + // parse the nonstandard "[alphapercent]" prefix + if (1 <= sscanf (name, "[%hd]%n", &c.a, &skip)) + { +- c.a = lerp (0, rgba::MAX_CC, c.a); ++ c.a = rxlerp (0, rgba::MAX_CC, c.a); + name += skip; + } + +@@ -981,10 +981,10 @@ rxvt_color::fade (rxvt_screen *screen, int percent, rxvt_color &result, const rg + result.set ( + screen, + rgba ( +- lerp (c.r, to.r, percent), +- lerp (c.g, to.g, percent), +- lerp (c.b, to.b, percent), +- lerp (c.a, to.a, percent) ++ rxlerp (c.r, to.r, percent), ++ rxlerp (c.g, to.g, percent), ++ rxlerp (c.b, to.b, percent), ++ rxlerp (c.a, to.a, percent) + ) + ); + } +diff --git a/src/rxvtutil.h b/src/rxvtutil.h +index d08b1bb..ec69cc1 100644 +--- a/src/rxvtutil.h ++++ b/src/rxvtutil.h +@@ -21,7 +21,7 @@ template static inline void clamp_it (T &v, + // linear interpolation + template + static inline T +-lerp (T a, U b, P p) ++rxlerp (T a, U b, P p) + { + return (long(a) * long(100 - p) + long(b) * long(p) + 50) / 100; + } +-- +2.49.0 +