From 219fbf8d4b09a9a3e06a8b11148647110ddb929c Mon Sep 17 00:00:00 2001 From: zhangxiaoyu Date: Mon, 26 Dec 2022 11:14:07 +0800 Subject: [PATCH] rollback strprint code modified Signed-off-by: zhangxiaoyu (cherry picked from commit a8901d46cf940aedcde48d1b038aa059b3935fcb) --- 0054-rollback-strprint-code-modified.patch | 26 ++++++++++++++++++++++ lxc.spec | 9 +++++++- 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 0054-rollback-strprint-code-modified.patch diff --git a/0054-rollback-strprint-code-modified.patch b/0054-rollback-strprint-code-modified.patch new file mode 100644 index 0000000..af19a9e --- /dev/null +++ b/0054-rollback-strprint-code-modified.patch @@ -0,0 +1,26 @@ +From aa328d34de2e6c0a8434ac4596344788539a3702 Mon Sep 17 00:00:00 2001 +From: zhangxiaoyu +Date: Mon, 26 Dec 2022 11:11:32 +0800 +Subject: [PATCH] rollback strprint code modified + +Signed-off-by: zhangxiaoyu +--- + src/lxc/confile_utils.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/lxc/confile_utils.h b/src/lxc/confile_utils.h +index 3655ec4..62990e9 100644 +--- a/src/lxc/confile_utils.h ++++ b/src/lxc/confile_utils.h +@@ -13,7 +13,7 @@ + if (str) \ + len = snprintf(str, inlen, ##__VA_ARGS__); \ + else \ +- len = 0; \ ++ len = snprintf((char *){""}, 0, ##__VA_ARGS__); \ + if (len < 0) { \ + SYSERROR("failed to create string"); \ + return -1; \ +-- +2.25.1 + diff --git a/lxc.spec b/lxc.spec index fffe212..b00ad29 100644 --- a/lxc.spec +++ b/lxc.spec @@ -1,4 +1,4 @@ -%global _release 2022102405 +%global _release 2022102406 Name: lxc Version: 4.0.3 @@ -61,6 +61,7 @@ Patch0050: 0050-lxc-Add-sw64-architecture.patch Patch0051: 0051-add-macro-to-adapt-musl-libc.patch Patch0052: 0052-add-lxc-attach-add-gids-option.patch Patch0053: 0053-change-the-suffi-parameter-in-lxc-attach-help-output.patch +Patch0054: 0054-rollback-strprint-code-modified.patch BuildRequires: systemd-units git libtool graphviz docbook2X doxygen chrpath BuildRequires: pkgconfig(libseccomp) @@ -241,6 +242,12 @@ make check %endif %changelog +* Mon Dec 26 2022 zhangxiaoyu - 4.0.3-2022102406 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC: rollback strprint code modified + * Fri Dec 16 2022 huangsong - 4.0.3-2022102405 - Type:bugfix - ID:NA -- Gitee