From: Hemanth Kumar M D <[email protected]>

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 <[email protected]>
---
 .../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 <[email protected]>
+---
+ 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;
+      }
+
-- 
2.49.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#127530): 
https://lists.openembedded.org/g/openembedded-devel/message/127530
Mute This Topic: https://lists.openembedded.org/mt/119755504/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to