From 295c7a4d76e21bc97ac5ad2ad0f401813f2a6161 Mon Sep 17 00:00:00 2001 From: lixiaokeng Date: Wed, 11 Aug 2021 20:22:49 +0800 Subject: [PATCH] fix compile error --- 0017-libmultipath-fix-compile-error.patch | 39 +++++++++++++++++++++++ multipath-tools.spec | 12 +++++-- 2 files changed, 49 insertions(+), 2 deletions(-) create mode 100644 0017-libmultipath-fix-compile-error.patch diff --git a/0017-libmultipath-fix-compile-error.patch b/0017-libmultipath-fix-compile-error.patch new file mode 100644 index 0000000..7f0d2d2 --- /dev/null +++ b/0017-libmultipath-fix-compile-error.patch @@ -0,0 +1,39 @@ +From 8cce6eb0d83151c97c18094e380d38b6085ff282 Mon Sep 17 00:00:00 2001 +From: lixiaokeng +Date: Wed, 11 Aug 2021 19:42:04 +0800 +Subject: [PATCH] libmultipath: fix compile error + +There is an error when complie with glibc-2.34: +comparison of integer expressions of different signedness: +'size_t' {aka 'long unsigned int'} and 'long int' +[-Werror=sign-compare] + +Explicit convert PTHREAD_STACK_MIN to size_t to fix it. + +Signed-off-by: Lixiaokeng +--- + libmultipath/util.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/libmultipath/util.c b/libmultipath/util.c +index 1748eaf..4d20cc1 100644 +--- a/libmultipath/util.c ++++ b/libmultipath/util.c +@@ -220,11 +220,12 @@ void + setup_thread_attr(pthread_attr_t *attr, size_t stacksize, int detached) + { + int ret; ++ size_t pthread_stack_min = PTHREAD_STACK_MIN; + + ret = pthread_attr_init(attr); + assert(ret == 0); +- if (stacksize < PTHREAD_STACK_MIN) +- stacksize = PTHREAD_STACK_MIN; ++ if (stacksize < pthread_stack_min) ++ stacksize = pthread_stack_min; + ret = pthread_attr_setstacksize(attr, stacksize); + assert(ret == 0); + if (detached) { +-- +1.8.3.1 + diff --git a/multipath-tools.spec b/multipath-tools.spec index d5820a0..37c113e 100644 --- a/multipath-tools.spec +++ b/multipath-tools.spec @@ -1,6 +1,6 @@ Name: multipath-tools Version: 0.8.5 -Release: 3 +Release: 4 Summary: Tools to manage multipath devices with the device-mapper License: GPL-2.0-or-later and LGPL-2.0-only URL: http://christophe.varoqui.free.fr/ @@ -23,7 +23,9 @@ Patch12: 0012-change-log-level-to-info-if-alua-is-not-support-by-s.patch Patch13: 0013-fix-find-multipath-failure.patch Patch14: 0014-kpartx-change-kpartx-file-and-default-bindir.patch Patch15: 0015-bugfix-RH-remove-local-disk-from-pathvec.patch -Patch16: 0016-bugfix-clear-mpp-path-reference-when-path-is-freed-otherwis.patch +Patch16: 0016-bugfix-clear-mpp-path-reference-when-path-is-freed-otherwis.patch +Patch17: 0017-libmultipath-fix-compile-error.patch + BuildRequires: gcc, libaio-devel, userspace-rcu-devel, device-mapper-devel >= 1.02.89 BuildRequires: libselinux-devel, libsepol-devel, readline-devel, ncurses-devel, BuildRequires: systemd-units, systemd-devel, json-c-devel, perl-interpreter, pkgconfig @@ -163,6 +165,12 @@ fi %changelog +* Wed Aug 11 2021 lixiaokeng - 0.8.5-4 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:fix compile error + * Fri Jul 30 2021 chenyanpanHW - 0.8.5-3 - DESC: delete -Sgit from %autosetup, and delete BuildRequires git