代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/lxc 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From d4cb8f6a8f46a3f5d72f22d7f79df83ad82215e0 Mon Sep 17 00:00:00 2001
From: zhangxiaoyu <[email protected]>
Date: Mon, 25 Jul 2022 16:42:03 +0800
Subject: [PATCH] check yajl only when have isulad
Signed-off-by: zhangxiaoyu <[email protected]>
---
configure.ac | 6 +++---
src/lxc/Makefile.am | 7 +++++--
src/lxc/af_unix.c | 2 +-
3 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/configure.ac b/configure.ac
index ce8854e..2180586 100644
--- a/configure.ac
+++ b/configure.ac
@@ -120,9 +120,6 @@ AM_CONDITIONAL([DISTRO_UBUNTU], [test "x$with_distro" = "xubuntu"])
AC_CONFIG_LINKS([config/etc/default.conf:config/etc/${distroconf}])
-# Check yajl
-PKG_CHECK_MODULES([YAJL], [yajl >= 2],[],[AC_MSG_ERROR([You must install yajl >= 2])])
-
# Check for init system type
AC_MSG_CHECKING([for init system type])
AC_ARG_WITH([init-script],
@@ -839,6 +836,9 @@ AM_CONDITIONAL([HAVE_ISULAD], [test "x$adapt_isulad" = "xyes"])
if test "x$adapt_isulad" = "xyes"; then
AC_DEFINE([HAVE_ISULAD], 1, [adapt to iSulad])
AC_MSG_RESULT([yes])
+
+ # Check yajl
+ PKG_CHECK_MODULES([YAJL], [yajl >= 2],[],[AC_MSG_ERROR([You must install yajl >= 2])])
else
AC_MSG_RESULT([no])
fi
diff --git a/src/lxc/Makefile.am b/src/lxc/Makefile.am
index b9a8750..61a229f 100644
--- a/src/lxc/Makefile.am
+++ b/src/lxc/Makefile.am
@@ -360,8 +360,11 @@ LDADD = liblxc.la \
@OPENSSL_LIBS@ \
@SECCOMP_LIBS@ \
@SELINUX_LIBS@ \
- @DLOG_LIBS@ \
- @YAJL_LIBS@
+ @DLOG_LIBS@
+
+if HAVE_ISULAD
+ LDADD += @YAJL_LIBS@
+endif
if ENABLE_TOOLS
lxc_attach_SOURCES = tools/lxc_attach.c \
diff --git a/src/lxc/af_unix.c b/src/lxc/af_unix.c
index cb4233e..0be9368 100644
--- a/src/lxc/af_unix.c
+++ b/src/lxc/af_unix.c
@@ -382,7 +382,7 @@ int lxc_unix_connect_type(struct sockaddr_un *addr, int type)
offsetof(struct sockaddr_un, sun_path) + len);
if (ret < 0)
#ifdef HAVE_ISULAD
- return log_error_errno(-1, errno,
+ return log_warn_errno(-1, errno,
"Failed to connect new AF_UNIX socket");
#else
return log_error_errno(-1, errno,
--
2.25.1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。