!62 [sync] PR-61: fix build error PTHREAD_STACJK_MIN

From: @openeuler-sync-bot
Reviewed-by: @liuzhiqiang26
Signed-off-by: @liuzhiqiang26
This commit is contained in:
openeuler-ci-bot 2021-08-15 02:45:23 +00:00 committed by Gitee
commit 5b964e6fa4
2 changed files with 34 additions and 1 deletions

View File

@ -0,0 +1,29 @@
From 4655a4fad848d2d844c19e375d34e0bf3a6228dc Mon Sep 17 00:00:00 2001
From: markeryang <yanglongkang@huawei.com>
Date: Fri, 13 Aug 2021 18:33:22 +0800
Subject: [PATCH] fix error PTHREAD_STACK_MIN
Signed-off-by: markeryang <yanglongkang@huawei.com>
Signed-off-by: lxk <lixiaokeng@huawei.com>
---
src/boost/boost/thread/pthread/thread_data.hpp | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/boost/boost/thread/pthread/thread_data.hpp b/src/boost/boost/thread/pthread/thread_data.hpp
index aefbeb43..9e459b1f 100644
--- a/src/boost/boost/thread/pthread/thread_data.hpp
+++ b/src/boost/boost/thread/pthread/thread_data.hpp
@@ -57,8 +57,9 @@ namespace boost
#else
std::size_t page_size = ::sysconf( _SC_PAGESIZE);
#endif
-#if PTHREAD_STACK_MIN > 0
- if (size<PTHREAD_STACK_MIN) size=PTHREAD_STACK_MIN;
+#ifdef PTHREAD_STACK_MIN
+ if (PTHREAD_STACK_MIN > 0 && size < (std::size_t)PTHREAD_STACK_MIN)
+ size = (std::size_t)PTHREAD_STACK_MIN;
#endif
size = ((size+page_size-1)/page_size)*page_size;
int res = pthread_attr_setstacksize(&val_, size);
--
2.23.0

View File

@ -110,7 +110,7 @@
#################################################################################
Name: ceph
Version: 14.2.15
Release: 5%{?dist}
Release: 6%{?dist}
%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler}
Epoch: 2
%endif
@ -136,6 +136,7 @@ Patch3: 0003-CVE-2020-27781-3.patch
Patch4: 0004-CVE-2020-27781-4.patch
Patch5: 0005-CVE-2020-27781-5.patch
Patch6: 0006-CVE-2021-3524-1.patch
Patch7: 0007-fix-build-error-PTHREAD_STACK_MIN.patch
%if 0%{?suse_version}
# _insert_obs_source_lines_here
@ -2043,6 +2044,9 @@ exit 0
%changelog
* Fri Aug 13 2021 yanglongkang <yanglongkang@huawei.com> - 1:14.2.15-6
- fix build error PTHREAD_STACJK_MIN
* Mon Jul 26 2021 chixinze <xmdxcxz@gmail.com> - 1:14.2.15-5
- fix CVE-2021-3524