lxc/0018-add-macro-to-adapt-musl-libc.patch
zhangxiaoyu b33aaece7b add macro to adapt musl libc
Signed-off-by: zhangxiaoyu <zhangxiaoyu58@huawei.com>
2022-11-24 17:21:05 +08:00

34 lines
815 B
Diff

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