summaryrefslogtreecommitdiff
path: root/dev-libs/concurrencykit/files/concurrencykit-glibc-2.30.patch
diff options
context:
space:
mode:
Diffstat (limited to 'dev-libs/concurrencykit/files/concurrencykit-glibc-2.30.patch')
-rw-r--r--dev-libs/concurrencykit/files/concurrencykit-glibc-2.30.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/dev-libs/concurrencykit/files/concurrencykit-glibc-2.30.patch b/dev-libs/concurrencykit/files/concurrencykit-glibc-2.30.patch
new file mode 100644
index 000000000000..452421c63125
--- /dev/null
+++ b/dev-libs/concurrencykit/files/concurrencykit-glibc-2.30.patch
@@ -0,0 +1,37 @@
+diff --git a/regressions/common.h b/regressions/common.h
+index 6e53483d..9cdc690a 100644
+--- a/regressions/common.h
++++ b/regressions/common.h
+@@ -267,13 +267,11 @@ struct affinity {
+ #define AFFINITY_INITIALIZER {0, 0}
+
+ #ifdef __linux__
+-#ifndef gettid
+ static pid_t
+-gettid(void)
++common_gettid(void)
+ {
+ return syscall(__NR_gettid);
+ }
+-#endif /* gettid */
+
+ CK_CC_UNUSED static int
+ aff_iterate(struct affinity *acb)
+@@ -285,7 +283,7 @@ aff_iterate(struct affinity *acb)
+ CPU_ZERO(&s);
+ CPU_SET(c % CORES, &s);
+
+- if (sched_setaffinity(gettid(), sizeof(s), &s) != 0)
++ if (sched_setaffinity(common_gettid(), sizeof(s), &s) != 0)
+ perror("WARNING: Could not affine thread");
+
+ return 0;
+@@ -300,7 +298,7 @@ aff_iterate_core(struct affinity *acb, unsigned int *core)
+ CPU_ZERO(&s);
+ CPU_SET((*core) % CORES, &s);
+
+- if (sched_setaffinity(gettid(), sizeof(s), &s) != 0)
++ if (sched_setaffinity(common_gettid(), sizeof(s), &s) != 0)
+ perror("WARNING: Could not affine thread");
+
+ return 0;