qtbase: durable patch for forkfd struct-rusage prototype scope (6.11.1)
forkfd_qt.c includes <forkfd.h> (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 <sys/resource.h> before <forkfd.h>. Durable patch, wired into qtbase recipe.
This commit is contained in:
@@ -12,6 +12,8 @@ blake3 = "c3b83023dc54f1173831bbc80abca1901418ef517875bf8071a4895d3c4a3162"
|
||||
patches = [
|
||||
"redox.patch",
|
||||
"qtwaylandscanner-null-guard-listeners.patch",
|
||||
"redox-in6-pktinfo.patch",
|
||||
"redox-forkfd-rusage-scope.patch",
|
||||
]
|
||||
|
||||
[build]
|
||||
|
||||
@@ -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
|
||||
+// <sys/resource.h>) 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 <sys/resource.h>
|
||||
#include <forkfd.h>
|
||||
#include "../../3rdparty/forkfd/forkfd.c"
|
||||
Reference in New Issue
Block a user