From 1cb4551ea440499a3d51a6cd5ca62d1fc8617ac8 Mon Sep 17 00:00:00 2001 From: wujing Date: Tue, 5 Jan 2021 17:07:03 +0800 Subject: [PATCH] fix compilation errors without libcap Signed-off-by: wujing --- ...ix-compilation-errors-without-libcap.patch | 32 +++++++++++++++++++ lxc.spec | 9 +++++- series.conf | 1 + 3 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 0017-fix-compilation-errors-without-libcap.patch diff --git a/0017-fix-compilation-errors-without-libcap.patch b/0017-fix-compilation-errors-without-libcap.patch new file mode 100644 index 0000000..fb5a0f8 --- /dev/null +++ b/0017-fix-compilation-errors-without-libcap.patch @@ -0,0 +1,32 @@ +From 5a3bec3f80d59dfcc76e16cbab957f4072601816 Mon Sep 17 00:00:00 2001 +From: wujing +Date: Tue, 5 Jan 2021 16:53:40 +0800 +Subject: [PATCH] fix compilation errors without libcap + +Signed-off-by: wujing +--- + src/lxc/conf.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/src/lxc/conf.c b/src/lxc/conf.c +index c3610ae3..19e193dd 100644 +--- a/src/lxc/conf.c ++++ b/src/lxc/conf.c +@@ -5301,11 +5301,12 @@ int lxc_drop_caps(struct lxc_conf *conf) + goto out; + } + +-#endif +- + out: + free(caplist); + return ret; ++#else ++ return 0; ++#endif + } + #endif + +-- +2.27.0 + diff --git a/lxc.spec b/lxc.spec index 394b2ac..fb6856f 100644 --- a/lxc.spec +++ b/lxc.spec @@ -1,4 +1,4 @@ -%global _release 2020122401 +%global _release 2021010501 Name: lxc Version: 4.0.3 @@ -24,6 +24,7 @@ Patch0013: 0013-use-path-based-unix-domain-sockets-instead-of-abstra.patch Patch0014: 0014-api-add-get-container-metrics-api.patch Patch0015: 0015-Streaming-IO-solution-optimization-and-enhancement.patch Patch0016: 0016-avoid-using-void-pointers-in-caclulation.patch +Patch0017: 0017-fix-compilation-errors-without-libcap.patch BuildRequires: systemd-units git libtool graphviz docbook2X doxygen chrpath BuildRequires: pkgconfig(libseccomp) @@ -195,6 +196,12 @@ make check %{_mandir}/*/man7/%{name}* %changelog +* Tue Jan 2021 wujing - 4.0.3-2021010501 +- Type:enhancement +- ID:NA +- SUG:NA +- DESC: fix compilation errors without libcap + * Thu Dec 24 2020 wujing - 4.0.3-2020122401 - Type:enhancement - ID:NA diff --git a/series.conf b/series.conf index 9fc66f1..2dc3690 100644 --- a/series.conf +++ b/series.conf @@ -14,3 +14,4 @@ 0014-api-add-get-container-metrics-api.patch 0015-Streaming-IO-solution-optimization-and-enhancement.patch 0016-avoid-using-void-pointers-in-caclulation.patch +0017-fix-compilation-errors-without-libcap.patch -- Gitee