From 1d930cd425599f652eb324a49fc584819816daef Mon Sep 17 00:00:00 2001 From: vasilito Date: Mon, 27 Jul 2026 09:39:22 +0900 Subject: [PATCH] qtbase: remove redundant open_memstream stub (relibc provides it) The qtbase recipe's strtold_cpp_compat.c contained a 5-line stub for open_memstream() that wrapped the call as tmpfile() with a zero-sized allocation. This was a workaround for relibc not implementing open_memstream. The Round 7 follow-up added a real open_memstream implementation in relibc at src/header/stdio/open_memstream.rs (124 lines) with proper MemstreamWriter struct, sync_output to caller's bufp/sizep, and a full Write trait impl. Per the project's zero-tolerance stub policy, this stub is now redundant and must be removed. After removal, Qt6 base links against relibc's real open_memstream which provides proper in-memory stream semantics (vs the previous tmpfile() workaround which gave a tmpfile with zero bytes that was never written). --- local/recipes/qt/qtbase/recipe.toml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/local/recipes/qt/qtbase/recipe.toml b/local/recipes/qt/qtbase/recipe.toml index 8bcc7a5856..f46b2bf9b3 100644 --- a/local/recipes/qt/qtbase/recipe.toml +++ b/local/recipes/qt/qtbase/recipe.toml @@ -97,15 +97,6 @@ long double relibc_compat_cpp_strtold(const char *nptr, char **endptr) long double relibc_compat_cpp_strtold(const char *nptr, char **endptr) { return strtold(nptr, endptr); } - -#include -#include -#include -FILE *open_memstream(char **ptr, size_t *sizeloc) { - *ptr = calloc(1, 1); - *sizeloc = 0; - return tmpfile(); -} EOF "${GNU_TARGET}-gcc" \ --sysroot="${COOKBOOK_SYSROOT}" \