From ed580325a383262288228dd14fdcd8b99fad7ef7 Mon Sep 17 00:00:00 2001 From: vasilito Date: Sat, 1 Aug 2026 18:10:30 +0300 Subject: [PATCH] =?UTF-8?q?kde:=20kf6-pty=20=E2=80=94=20disable=20UTEMPTER?= =?UTF-8?q?=20+=20fix=20botched=20=5F=5Fredox=5F=5F=20#ifdef=20balance?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - FindUTEMPTER aborts when cross-compiling unless told what to do; Redox has no utmp/wtmp login-record DB, so pass -DCMAKE_DISABLE_FIND_PACKAGE_UTEMPTER=ON (PTYs work without it; utempter only feeds who/w login accounting). - kpty.cpp's __redox__ no-op guard around KPty::login()/logout() had dropped the #endif for the UTEMPTER_PATH and HAVE_LOGIN blocks and never closed the new __redox__ #ifdef, leaving both functions 3 #if deep at their closing brace (unterminated #else / expected '}'). Add the 3 missing #endif to each. --- local/recipes/kde/kf6-pty/recipe.toml | 1 + local/recipes/kde/kf6-pty/source/src/kpty.cpp | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/local/recipes/kde/kf6-pty/recipe.toml b/local/recipes/kde/kf6-pty/recipe.toml index fd05770cae..c87310c588 100644 --- a/local/recipes/kde/kf6-pty/recipe.toml +++ b/local/recipes/kde/kf6-pty/recipe.toml @@ -47,6 +47,7 @@ cmake "${COOKBOOK_SOURCE}" \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_PREFIX_PATH="${COOKBOOK_SYSROOT}" \ -DBUILD_TESTING=OFF \ + -DCMAKE_DISABLE_FIND_PACKAGE_UTEMPTER=ON \ -DBUILD_QCH=OFF \ -DHAVE_PTSNAME=TRUE \ -DHAVE_GRANTPT=TRUE \ diff --git a/local/recipes/kde/kf6-pty/source/src/kpty.cpp b/local/recipes/kde/kf6-pty/source/src/kpty.cpp index 272ad71e05..98a4d311b9 100644 --- a/local/recipes/kde/kf6-pty/source/src/kpty.cpp +++ b/local/recipes/kde/kf6-pty/source/src/kpty.cpp @@ -540,6 +540,9 @@ void KPty::login(const char *user, const char *remotehost) endutent(); updwtmp(_PATH_WTMP, &l_struct); #endif +#endif // HAVE_LOGIN +#endif // UTEMPTER_PATH +#endif // __redox__ } void KPty::logout() @@ -621,6 +624,9 @@ void KPty::logout() } endutent(); #endif +#endif // HAVE_LOGIN +#endif // UTEMPTER_PATH +#endif // __redox__ } bool KPty::tcGetAttr(struct ::termios *ttmode) const