!57 修复glibc升级导致multipath-tools编译失败

From: @lixiaokeng
Reviewed-by: 
Signed-off-by: @liuzhiqiang26
This commit is contained in:
openeuler-ci-bot 2021-08-12 02:16:00 +00:00 committed by Gitee
commit 175f71ced6
2 changed files with 49 additions and 2 deletions

View File

@ -0,0 +1,39 @@
From 8cce6eb0d83151c97c18094e380d38b6085ff282 Mon Sep 17 00:00:00 2001
From: lixiaokeng <lixiaokeng@huawei.com>
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 <lixiaokeng@huawei.com>
---
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

View File

@ -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<lixiaokeng@huawei.com> - 0.8.5-4
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:fix compile error
* Fri Jul 30 2021 chenyanpanHW <chenyanpan@huawei.com> - 0.8.5-3
- DESC: delete -Sgit from %autosetup, and delete BuildRequires git