From b247a4d44b30330c59ff11ce02a94ab21174f601 Mon Sep 17 00:00:00 2001 From: Hemanth Kumar M D Date: Thu, 11 Jun 2026 05:32:22 -0700 Subject: [PATCH] directfb: fix build with GCC 16 GCC 16 requires std::set comparators to be callable on a const comparator object. TaskManager::operator() is used as a comparator but is not const-qualified, causing the build to fail. Add the missing const qualifier to restore compatibility with GCC 16. Link: https://github.com/deniskropp/DirectFB/issues/29 Signed-off-by: Hemanth Kumar M D Signed-off-by: Khem Raj --- .../recipes-graphics/directfb/directfb.inc | 3 ++- ...01-TaskManager-make-comparator-const.patch | 26 +++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 meta-oe/recipes-graphics/directfb/directfb/0001-TaskManager-make-comparator-const.patch diff --git a/meta-oe/recipes-graphics/directfb/directfb.inc b/meta-oe/recipes-graphics/directfb/directfb.inc index 0dc410b2cb..70e1280e2f 100644 --- a/meta-oe/recipes-graphics/directfb/directfb.inc +++ b/meta-oe/recipes-graphics/directfb/directfb.inc @@ -26,7 +26,8 @@ SRC_URI = "http://downloads.yoctoproject.org/mirror/sources/DirectFB-${PV}.tar.g file://0001-include-libgen.h-for-basename.patch \ file://0001-inputdrivers-Correct-the-signature-of-bind-call-on-m.patch \ file://0001-libdirect-remove-use-of-keyword-register.patch \ - " + file://0001-TaskManager-make-comparator-const.patch \ + " S = "${UNPACKDIR}/DirectFB-${PV}" diff --git a/meta-oe/recipes-graphics/directfb/directfb/0001-TaskManager-make-comparator-const.patch b/meta-oe/recipes-graphics/directfb/directfb/0001-TaskManager-make-comparator-const.patch new file mode 100644 index 0000000000..3064a4f420 --- /dev/null +++ b/meta-oe/recipes-graphics/directfb/directfb/0001-TaskManager-make-comparator-const.patch @@ -0,0 +1,26 @@ +TaskManager: make comparator const for GCC 16 + +Fixes build failure with GCC 16 due to stricter libstdc++ requirements +for std::set comparator (must be const-callable). + +Upstream-Status: Submitted [https://github.com/deniskropp/DirectFB/issues/29] + +Signed-off-by: Hemanth Kumar M D +--- + src/core/TaskManager.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/core/TaskManager.h b/src/core/TaskManager.h +index 3f2174c..6ac29ee 100644 +--- a/src/core/TaskManager.h ++++ b/src/core/TaskManager.h +@@ -121,7 +121,7 @@ public: + static void dumpTasks(); + + +- bool operator()( Task *t1, Task *t2 ) ++ bool operator()( Task *t1, Task *t2 ) const + { + return t1->ts_emit < t2->ts_emit; + } +