From af15b4566c2cf9dfc8fc6d5f3c41525a881e4383 Mon Sep 17 00:00:00 2001 From: yangfeng Date: Thu, 14 Aug 2025 19:17:47 +0800 Subject: [PATCH] feature(error.h): fix openeuler2509 compile error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 修复openeuler2509编译错误 Related #91555 --- ...or.h-fix-openeuler2509-compile-error.patch | 77 +++++++++++++++++++ kiran-authentication-service.spec | 6 +- 2 files changed, 82 insertions(+), 1 deletion(-) create mode 100644 0013-feature-error.h-fix-openeuler2509-compile-error.patch diff --git a/0013-feature-error.h-fix-openeuler2509-compile-error.patch b/0013-feature-error.h-fix-openeuler2509-compile-error.patch new file mode 100644 index 0000000..3b669ca --- /dev/null +++ b/0013-feature-error.h-fix-openeuler2509-compile-error.patch @@ -0,0 +1,77 @@ +From 02fee31acb6034cd835fda4211d8295d67ac31b3 Mon Sep 17 00:00:00 2001 +From: yangfeng +Date: Thu, 14 Aug 2025 19:15:05 +0800 +Subject: [PATCH] feature(error.h): fix openeuler2509 compile error +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +- 修复openeuler2509编译错误 +Related #91555 +--- + src/daemon/error.h | 34 ++++++++++++++++------------------ + 1 file changed, 16 insertions(+), 18 deletions(-) + +diff --git a/src/daemon/error.h b/src/daemon/error.h +index 1539aba..8bea38e 100644 +--- a/src/daemon/error.h ++++ b/src/daemon/error.h +@@ -21,31 +21,29 @@ namespace Kiran + { + #define KAD_ERROR2STR(errorCode) KADError::getErrorDesc(errorCode) + +-#define DBUS_ERROR_REPLY(type, errorCode, ...) \ +- { \ +- char buffer[1024] = {0}; \ +- qsnprintf(buffer, sizeof(buffer), KAD_ERROR2STR(errorCode).toUtf8().data(), ##__VA_ARGS__); \ +- sendErrorReply(type, QString(buffer)); \ ++#define DBUS_ERROR_REPLY(type, errorCode) \ ++ { \ ++ QString msg = KAD_ERROR2STR(errorCode); \ ++ sendErrorReply(type, msg); \ + } + +-#define DBUS_ERROR_REPLY_AND_RET(type, errorCode, ...) \ +- DBUS_ERROR_REPLY(type, errorCode, ##__VA_ARGS__); \ ++#define DBUS_ERROR_REPLY_AND_RET(type, errorCode) \ ++ DBUS_ERROR_REPLY(type, errorCode); \ + return; + +-#define DBUS_ERROR_REPLY_WITH_RET(retval, type, errorCode, ...) \ +- DBUS_ERROR_REPLY(type, errorCode, ##__VA_ARGS__); \ ++#define DBUS_ERROR_REPLY_WITH_RET(retval, type, errorCode) \ ++ DBUS_ERROR_REPLY(type, errorCode); \ + return retval; + +-#define DBUS_ERROR_REPLY_ASYNC(message, type, errorCode, ...) \ +- { \ +- char buffer[1024] = {0}; \ +- qsnprintf(buffer, sizeof(buffer), KAD_ERROR2STR(errorCode).toUtf8().data(), ##__VA_ARGS__); \ +- auto replyMessage = message.createErrorReply(type, QString(buffer)); \ +- QDBusConnection::systemBus().send(replyMessage); \ ++#define DBUS_ERROR_REPLY_ASYNC(message, type, errorCode) \ ++ { \ ++ QString msg = KAD_ERROR2STR(errorCode); \ ++ auto replyMessage = message.createErrorReply(type, msg); \ ++ QDBusConnection::systemBus().send(replyMessage); \ + } + +-#define DBUS_ERROR_REPLY_ASYNC_AND_RET(message, type, errorCode, ...) \ +- DBUS_ERROR_REPLY_ASYNC(message, type, errorCode, ##__VA_ARGS__); \ ++#define DBUS_ERROR_REPLY_ASYNC_AND_RET(message, type, errorCode) \ ++ DBUS_ERROR_REPLY_ASYNC(message, type, errorCode); \ + return; + + enum KADErrorCode +@@ -75,7 +73,7 @@ class KADError + { + public: + KADError(); +- virtual ~KADError(){}; ++ virtual ~KADError() {}; + + static QString getErrorDesc(KADErrorCode errorCode); + }; +-- +2.33.0 + diff --git a/kiran-authentication-service.spec b/kiran-authentication-service.spec index 59ae8a1..ac23d9e 100644 --- a/kiran-authentication-service.spec +++ b/kiran-authentication-service.spec @@ -1,6 +1,6 @@ Name: kiran-authentication-service Version: 2.5.1 -Release: 9 +Release: 10 Summary: Kiran Desktop kiran authentication service License: MulanPSL-2.0 URL: http://www.kylinsec.com.cn @@ -19,6 +19,7 @@ Patch0009: 0009-fix-multi-factor-multi-factor-no-jump-login.patch Patch0010: 0010-fix-multi-channel-auth-If-the-authentication-fails-t.patch Patch0011: 0011-feat-auth-error-Subdivide-the-cause-of-the-error-and.patch Patch0012: 0012-fix-kiran-authentication-service-fix-for-versions-ea.patch +Patch0013: 0013-feature-error.h-fix-openeuler2509-compile-error.patch Obsoletes: kiran-biometrics @@ -96,6 +97,9 @@ systemctl enable kiran-authentication-daemon.service %{_includedir}/kiran-authentication-service/kas-authentication-i.h %changelog +* Thu Aug 14 2025 yangfeng - 2.5.1-10 +- KYOS-B: fix openeuler2509 compile error + * Mon Dec 16 2024 liuxinhao - 2.5.1-9 - add obsoletes kiran-biometrics -- Gitee