From 025865aed90f633aad390c4802590c1bd3999ac5 Mon Sep 17 00:00:00 2001 From: zhangxiaoyu Date: Tue, 29 Nov 2022 17:08:25 +0800 Subject: [PATCH] add macro to adapt musl libc Signed-off-by: zhangxiaoyu --- 0051-add-macro-to-adapt-musl-libc.patch | 33 +++++++++++++++++++++++++ lxc.spec | 11 +++++++-- series.conf | 2 ++ 3 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 0051-add-macro-to-adapt-musl-libc.patch diff --git a/0051-add-macro-to-adapt-musl-libc.patch b/0051-add-macro-to-adapt-musl-libc.patch new file mode 100644 index 0000000..5247304 --- /dev/null +++ b/0051-add-macro-to-adapt-musl-libc.patch @@ -0,0 +1,33 @@ +From 62f36cfa7abafa213b7a0ba26136b409d241b019 Mon Sep 17 00:00:00 2001 +From: isuladci +Date: Thu, 24 Nov 2022 17:05:44 +0800 +Subject: [PATCH] add macro to adapt musl libc + +Signed-off-by: isuladci +--- + src/lxc/json/json_common.h | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/src/lxc/json/json_common.h b/src/lxc/json/json_common.h +index 60aa5fd..67c2df8 100755 +--- a/src/lxc/json/json_common.h ++++ b/src/lxc/json/json_common.h +@@ -17,6 +17,15 @@ extern "C" { + + # undef linux + ++#ifdef __MUSL__ ++#undef stdin ++#undef stdout ++#undef stderr ++#define stdin stdin ++#define stdout stdout ++#define stderr stderr ++#endif ++ + //options to report error if there is unknown key found in json + # define PARSE_OPTIONS_STRICT 0x01 + //options to generate all key and value +-- +2.25.1 + diff --git a/lxc.spec b/lxc.spec index 44b5956..9b0032f 100644 --- a/lxc.spec +++ b/lxc.spec @@ -1,4 +1,4 @@ -%global _release 2022102402 +%global _release 2022102403 Name: lxc Version: 4.0.3 @@ -57,7 +57,8 @@ Patch0046: 0046-return-fail-if-no-args-or-no-rootfs-path-found.patch Patch0047: 0047-fix-tools-with-option-give-error-message.patch Patch0048: 0048-fix-do-mask-paths-after-parent-mounted.patch Patch0049: 0049-skip-kill-cgroup-processes-if-no-hierarchies.patch -Patch0050: 0050-lxc-Add-sw64-architecture.patch +Patch0050: 0050-lxc-Add-sw64-architecture.patch +Patch0051: 0051-add-macro-to-adapt-musl-libc.patch BuildRequires: systemd-units git libtool graphviz docbook2X doxygen chrpath BuildRequires: pkgconfig(libseccomp) @@ -238,6 +239,12 @@ make check %endif %changelog +* Thu Nov 24 2022 zhangxiaoyu - 4.0.3-2022102403 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC: add macro to adapt musl libc + * Mon Oct 24 2022 wuzx - 4.0.3-2022102401 - Type:feature - CVE:NA diff --git a/series.conf b/series.conf index 26cd97f..e7e273e 100644 --- a/series.conf +++ b/series.conf @@ -47,3 +47,5 @@ 0047-fix-tools-with-option-give-error-message.patch 0048-fix-do-mask-paths-after-parent-mounted.patch 0049-skip-kill-cgroup-processes-if-no-hierarchies.patch +0050-lxc-Add-sw64-architecture.patch +0051-add-macro-to-adapt-musl-libc.patch -- Gitee