Remove static gettid definition

Static function gettid makes troubles when compiling tests,
because the extern declaration exists.
This might not be the best way to fix this, but it makes the tests succeed.
This commit is contained in:
Honza Horak 2019-08-21 09:29:15 +02:00
parent 47e16574e1
commit a1989242b0
2 changed files with 28 additions and 2 deletions

21
ck-nogettid.patch Normal file
View File

@ -0,0 +1,21 @@
Static function gettid makes troubles when compiling tests,
because the extern declaration exists.
This might not be the best way to fix this, but it makes the tests succeed.
diff -up ck-0.6.0/regressions/common.h.nogettid ck-0.6.0/regressions/common.h
--- ck-0.6.0/regressions/common.h.nogettid 2019-08-21 08:10:51.593209466 +0200
+++ ck-0.6.0/regressions/common.h 2019-08-21 08:11:05.320341728 +0200
@@ -267,13 +267,6 @@ struct affinity {
#define AFFINITY_INITIALIZER {0, 0}
#ifdef __linux__
-#ifndef gettid
-static pid_t
-gettid(void)
-{
- return syscall(__NR_gettid);
-}
-#endif /* gettid */
CK_CC_UNUSED static int
aff_iterate(struct affinity *acb)

View File

@ -1,6 +1,6 @@
Name: ck
Version: 0.6.0
Release: 9%{?dist}
Release: 10%{?dist}
Summary: Library for high performance concurrent programming
License: BSD
@ -8,6 +8,7 @@ URL: http://concurrencykit.org
Source: http://concurrencykit.org/releases/ck-%{version}.tar.gz
Patch0: ck-config-s390x.patch
Patch1: ck-nogettid.patch
BuildRequires: gcc
@ -37,6 +38,7 @@ resources needed for developing Concurrency Kit applications.
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%build
export CFLAGS="%{optflags}"
@ -59,7 +61,7 @@ rm %{buildroot}%{_libdir}/libck.a
%check
# tests fail on ppc64 and ppc64le, but since it's not whether it is problem
# in tests or library, let's just ignore tests results for now
%ifarch %{ix86} x86_64 ppc64 ppc64le
%ifarch ppc64 ppc64le
make check || :
%else
make check
@ -78,6 +80,9 @@ make check
%ldconfig_scriptlets
%changelog
* Wed Aug 21 2019 Honza Horak <hhorak@redhat.com> - 0.6.0-10
- Remove static gettid definition
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.0-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild