diff options
Diffstat (limited to 'meta-python/recipes-devtools/python')
-rw-r--r-- | meta-python/recipes-devtools/python/python-grpcio.inc | 1 | ||||
-rw-r--r-- | meta-python/recipes-devtools/python/python-grpcio/gettid.patch | 26 |
2 files changed, 27 insertions, 0 deletions
diff --git a/meta-python/recipes-devtools/python/python-grpcio.inc b/meta-python/recipes-devtools/python/python-grpcio.inc index fd341f5de7..7d3675c455 100644 --- a/meta-python/recipes-devtools/python/python-grpcio.inc +++ b/meta-python/recipes-devtools/python/python-grpcio.inc | |||
@@ -9,6 +9,7 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/python-grpcio:" | |||
9 | SRC_URI_append_class-target = " file://0001-setup.py-Do-not-mix-C-and-C-compiler-options.patch \ | 9 | SRC_URI_append_class-target = " file://0001-setup.py-Do-not-mix-C-and-C-compiler-options.patch \ |
10 | file://ppc-boringssl-support.patch \ | 10 | file://ppc-boringssl-support.patch \ |
11 | file://riscv64_support.patch \ | 11 | file://riscv64_support.patch \ |
12 | file://gettid.patch \ | ||
12 | " | 13 | " |
13 | 14 | ||
14 | RDEPENDS_${PN} = "${PYTHON_PN}-protobuf \ | 15 | RDEPENDS_${PN} = "${PYTHON_PN}-protobuf \ |
diff --git a/meta-python/recipes-devtools/python/python-grpcio/gettid.patch b/meta-python/recipes-devtools/python/python-grpcio/gettid.patch new file mode 100644 index 0000000000..fb15cf7f96 --- /dev/null +++ b/meta-python/recipes-devtools/python/python-grpcio/gettid.patch | |||
@@ -0,0 +1,26 @@ | |||
1 | use glibc provided gettid API for glibc 2.30+ | ||
2 | |||
3 | glibc 2.30 introduced this function see [1] | ||
4 | so it's best to detect it | ||
5 | and provide fallback only if it's not present | ||
6 | |||
7 | [1] https://sourceware.org/bugzilla/show_bug.cgi?id=6399 | ||
8 | |||
9 | Upstream-Status: Pending | ||
10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
11 | --- a/src/core/lib/gpr/log_linux.cc | ||
12 | +++ b/src/core/lib/gpr/log_linux.cc | ||
13 | @@ -40,7 +40,13 @@ | ||
14 | #include <time.h> | ||
15 | #include <unistd.h> | ||
16 | |||
17 | +#if defined(__GLIBC__) | ||
18 | +#if !__GLIBC_PREREQ(2,29) | ||
19 | static long gettid(void) { return syscall(__NR_gettid); } | ||
20 | +#endif | ||
21 | +#else | ||
22 | +static long gettid(void) { return syscall(__NR_gettid); } | ||
23 | +#endif | ||
24 | |||
25 | void gpr_log(const char* file, int line, gpr_log_severity severity, | ||
26 | const char* format, ...) { | ||