From b33aaece7b1abef02c6ff7285e913a98312b5900 Mon Sep 17 00:00:00 2001 From: zhangxiaoyu Date: Thu, 24 Nov 2022 17:21:05 +0800 Subject: [PATCH] add macro to adapt musl libc Signed-off-by: zhangxiaoyu --- 0018-add-macro-to-adapt-musl-libc.patch | 33 +++++++++++++++++++++++++ lxc.spec | 11 +++++++-- series.conf | 2 +- 3 files changed, 43 insertions(+), 3 deletions(-) create mode 100644 0018-add-macro-to-adapt-musl-libc.patch diff --git a/0018-add-macro-to-adapt-musl-libc.patch b/0018-add-macro-to-adapt-musl-libc.patch new file mode 100644 index 0000000..5247304 --- /dev/null +++ b/0018-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 be1f0d3..e8e4fab 100644 --- a/lxc.spec +++ b/lxc.spec @@ -1,4 +1,4 @@ -%global _release 2022102402 +%global _release 2022102403 Name: lxc Version: 4.0.3 @@ -25,6 +25,7 @@ Patch0014: 0014-fix-tools-using-option-give-error-message.patch Patch0015: 0015-fix-do-mask-pathes-after-parent-mounted.patch Patch0016: 0016-skip-kill-cgroup-processes-if-no-hierarchies.patch Patch0017: 0017-lxc-Add-sw64-architecture.patch +Patch0018: 0018-add-macro-to-adapt-musl-libc.patch BuildRequires: systemd-units git libtool graphviz docbook2X doxygen chrpath BuildRequires: pkgconfig(libseccomp) @@ -205,6 +206,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 + * Wed Nov 9 2022 hejunjie - 4.0.3-2022102402 - Type:bugfix - ID:NA @@ -223,7 +230,7 @@ make check - SUG:NA - DESC: update version to 4.0.3-2022101701 -* The Sep 22 2022 zhangxiaoyu - 4.0.3-2022092201 +* Thu Sep 22 2022 zhangxiaoyu - 4.0.3-2022092201 - Type:bugfix - ID:NA - SUG:NA diff --git a/series.conf b/series.conf index 5d592fc..7522ac7 100644 --- a/series.conf +++ b/series.conf @@ -14,4 +14,4 @@ 0014-fix-tools-using-option-give-error-message.patch 0015-fix-do-mask-pathes-after-parent-mounted.patch 0017-lxc-Add-sw64-architecture.patch - +0018-add-macro-to-adapt-musl-libc.patch -- Gitee