add macro to adapt musl libc

Signed-off-by: zhangxiaoyu <zhangxiaoyu58@huawei.com>
This commit is contained in:
zhangxiaoyu 2022-11-24 17:21:05 +08:00
parent d72feda7b8
commit b33aaece7b
3 changed files with 43 additions and 3 deletions

View File

@ -0,0 +1,33 @@
From 62f36cfa7abafa213b7a0ba26136b409d241b019 Mon Sep 17 00:00:00 2001
From: isuladci <isulad@ci.com>
Date: Thu, 24 Nov 2022 17:05:44 +0800
Subject: [PATCH] add macro to adapt musl libc
Signed-off-by: isuladci <isulad@ci.com>
---
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

View File

@ -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<zhangxiaoyu58@huawei.com> - 4.0.3-2022102403
- Type:bugfix
- ID:NA
- SUG:NA
- DESC: add macro to adapt musl libc
* Wed Nov 9 2022 hejunjie<hejunjie10@huawei.com> - 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<zhangxiaoyu58@huawei.com> - 4.0.3-2022092201
* Thu Sep 22 2022 zhangxiaoyu<zhangxiaoyu58@huawei.com> - 4.0.3-2022092201
- Type:bugfix
- ID:NA
- SUG:NA

View File

@ -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