From 570d83d90469f2cdc622e207c782ee6165562456 Mon Sep 17 00:00:00 2001 From: fandeyuan Date: Thu, 7 Nov 2024 15:34:02 +0800 Subject: [PATCH] fix function undeclared in libdm-common.c and dev-cache.c,support clang --- ...ed-in-libdm-common.c-and-dev-cache.c.patch | 37 +++++++++++++++++++ lvm2.spec | 7 +++- 2 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 0035-fix-function-undeclared-in-libdm-common.c-and-dev-cache.c.patch diff --git a/0035-fix-function-undeclared-in-libdm-common.c-and-dev-cache.c.patch b/0035-fix-function-undeclared-in-libdm-common.c-and-dev-cache.c.patch new file mode 100644 index 0000000..4f0870b --- /dev/null +++ b/0035-fix-function-undeclared-in-libdm-common.c-and-dev-cache.c.patch @@ -0,0 +1,37 @@ +From 575e88c4591efe7783d00445880269c17e9db579 Mon Sep 17 00:00:00 2001 +From: yuncang123 <1050706328@qq.com> +Date: Sat, 7 Sep 2024 18:34:09 +0800 +Subject: [PATCH] fix function undeclared in libdm-common.c and dev-cache.c,support clang + +--- + lib/device/dev-cache.c | 1 + + libdm/libdm-common.c | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/lib/device/dev-cache.c b/lib/device/dev-cache.c +index f565179..87b3bc3 100644 +--- a/lib/device/dev-cache.c ++++ b/lib/device/dev-cache.c +@@ -31,6 +31,7 @@ + #include + /* coverity[unnecessary_header] needed for MuslC */ + #include ++#include + + struct dev_iter { + struct btree_iter *current; +diff --git a/libdm/libdm-common.c b/libdm/libdm-common.c +index dcc9e40..d219e1e 100644 +--- a/libdm/libdm-common.c ++++ b/libdm/libdm-common.c +@@ -24,6 +24,7 @@ + #include + #include + #include ++#include + + #ifdef UDEV_SYNC_SUPPORT + # include +-- +2.43.0 + diff --git a/lvm2.spec b/lvm2.spec index d1e81b7..0a1932b 100644 --- a/lvm2.spec +++ b/lvm2.spec @@ -43,7 +43,7 @@ Name: lvm2 Version: 2.03.14 -Release: 15 +Release: 16 Epoch: 8 Summary: Tools for logical volume management License: GPLv2+ and LGPLv2.1 and BSD @@ -83,6 +83,7 @@ Patch31: 0031-udev-import-previous-results-of-blkid-when-in-suspen.patch Patch32: 0032-clean-up-group-struct-in-_stats_create_group-error-path.patch Patch33: 0033-dm-event-release-buffer-on-dm_event_get_version.patch Patch34: 0034-dmstats-Fix-memory-leak-on-error-path.patch +Patch35: 0035-fix-function-undeclared-in-libdm-common.c-and-dev-cache.c.patch BuildRequires: gcc BuildRequires: gcc-c++ @@ -509,6 +510,10 @@ fi %changelog +* Thu Nov 7 2024 Deyuan Fan - 8:2.03.14-16 +- support clang build: + - fix function undeclared in libdm-common.c and dev-cache.c + * Wed Oct 23 2024 yanshuai - 8:2.03.14-15 - dmstats: Fix memory leak on error path -- Gitee