From 2349d5f6721626f701e59f16db08d74e41ab65d6 Mon Sep 17 00:00:00 2001 From: vasilito Date: Fri, 24 Jul 2026 20:28:42 +0900 Subject: [PATCH] qtbase: durable patch for forkfd struct-rusage prototype scope (6.11.1) forkfd_qt.c includes (whose forkfd_wait4 prototype takes struct rusage*) before struct rusage is declared at file scope; sys/resource.h is only pulled in later by forkfd.c. So the header prototype gets a prototype-scoped struct rusage incompatible with the file-scope one in the definition -> "conflicting types for forkfd_wait4". 6.11.0 qglobal.h pulled it in transitively; 6.11.1 does not. Fix: include before . Durable patch, wired into qtbase recipe. --- local/recipes/qt/qtbase/recipe.toml | 2 ++ .../qt/qtbase/redox-forkfd-rusage-scope.patch | 16 ++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 local/recipes/qt/qtbase/redox-forkfd-rusage-scope.patch diff --git a/local/recipes/qt/qtbase/recipe.toml b/local/recipes/qt/qtbase/recipe.toml index 7635e02496..1bacaf2745 100644 --- a/local/recipes/qt/qtbase/recipe.toml +++ b/local/recipes/qt/qtbase/recipe.toml @@ -12,6 +12,8 @@ blake3 = "c3b83023dc54f1173831bbc80abca1901418ef517875bf8071a4895d3c4a3162" patches = [ "redox.patch", "qtwaylandscanner-null-guard-listeners.patch", + "redox-in6-pktinfo.patch", + "redox-forkfd-rusage-scope.patch", ] [build] diff --git a/local/recipes/qt/qtbase/redox-forkfd-rusage-scope.patch b/local/recipes/qt/qtbase/redox-forkfd-rusage-scope.patch new file mode 100644 index 0000000000..69c179bb94 --- /dev/null +++ b/local/recipes/qt/qtbase/redox-forkfd-rusage-scope.patch @@ -0,0 +1,16 @@ +--- a/src/corelib/io/forkfd_qt.c ++++ b/src/corelib/io/forkfd_qt.c +@@ -12,5 +12,13 @@ + # define NDEBUG + #endif + ++// Redox: declare struct rusage at file scope BEFORE forkfd.h, whose ++// forkfd_wait4() prototype takes a struct rusage*. Without a prior file-scope ++// declaration the struct is implicitly declared in prototype scope, so the ++// header prototype and the definition in forkfd.c (which includes ++// ) get incompatible struct rusage types -> "conflicting types ++// for 'forkfd_wait4'". (6.11.0's qglobal.h pulled this in transitively; 6.11.1 ++// does not.) ++#include + #include + #include "../../3rdparty/forkfd/forkfd.c"