diff --git a/local/recipes/kde/sddm/recipe.toml b/local/recipes/kde/sddm/recipe.toml index 5bb387d791..6ad9da0bf3 100644 --- a/local/recipes/kde/sddm/recipe.toml +++ b/local/recipes/kde/sddm/recipe.toml @@ -13,6 +13,9 @@ patches = [ # Redox has no Linux/FreeBSD VT subsystem (VT_ACTIVATE/VT_WAITACTIVE/KDSETMODE # etc.); stub SDDM::VirtualTerminal to no-ops (greeter runs on the compositor). "redox-virtualterminal-stub.patch", + # Redox has no utmp/utmpx login-accounting DB; stub sddm-helper's + # utmpLogin/utmpLogout to no-ops (skip ). + "redox-helper-utmpx-stub.patch", ] [build] diff --git a/local/recipes/kde/sddm/redox-helper-utmpx-stub.patch b/local/recipes/kde/sddm/redox-helper-utmpx-stub.patch new file mode 100644 index 0000000000..6b3e1aa952 --- /dev/null +++ b/local/recipes/kde/sddm/redox-helper-utmpx-stub.patch @@ -0,0 +1,46 @@ +--- a/src/helper/HelperApp.cpp ++++ b/src/helper/HelperApp.cpp +@@ -41,7 +41,9 @@ + #if defined(Q_OS_LINUX) + #include + #endif ++#if !defined(__redox__) + #include ++#endif + #include + #include + +@@ -301,6 +303,10 @@ + } + + void HelperApp::utmpLogin(const QString &vt, const QString &displayName, const QString &user, qint64 pid, bool authSuccessful) { ++#if defined(__redox__) ++ // Redox has no utmp/utmpx login-accounting database; no-op. ++ Q_UNUSED(vt); Q_UNUSED(displayName); Q_UNUSED(user); Q_UNUSED(pid); Q_UNUSED(authSuccessful); ++#else + struct utmpx entry { }; + struct timeval tv; + +@@ -339,9 +345,14 @@ + #if defined(Q_OS_LINUX) + updwtmpx(authSuccessful ? "/var/log/wtmp" : "/var/log/btmp", &entry); + #endif ++#endif // !__redox__ + } + + void HelperApp::utmpLogout(const QString &vt, const QString &displayName, qint64 pid) { ++#if defined(__redox__) ++ // Redox has no utmp/utmpx login-accounting database; no-op. ++ Q_UNUSED(vt); Q_UNUSED(displayName); Q_UNUSED(pid); ++#else + struct utmpx entry { }; + struct timeval tv; + +@@ -378,6 +389,7 @@ + #elif defined(Q_OS_FREEBSD) + pututxline(&entry); + #endif ++#endif // !__redox__ + } + } +