From 381508f909a1279a42dfb6e7a12a9da06a752312 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Fri, 26 Jul 2019 18:29:19 -0700 Subject: python-grpcio: Use gettid API from glibc 2.30+ Signed-off-by: Khem Raj --- .../python/python-grpcio/gettid.patch | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 meta-python/recipes-devtools/python/python-grpcio/gettid.patch (limited to 'meta-python/recipes-devtools/python/python-grpcio/gettid.patch') 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 @@ +use glibc provided gettid API for glibc 2.30+ + +glibc 2.30 introduced this function see [1] +so it's best to detect it +and provide fallback only if it's not present + +[1] https://sourceware.org/bugzilla/show_bug.cgi?id=6399 + +Upstream-Status: Pending +Signed-off-by: Khem Raj +--- a/src/core/lib/gpr/log_linux.cc ++++ b/src/core/lib/gpr/log_linux.cc +@@ -40,7 +40,13 @@ + #include + #include + ++#if defined(__GLIBC__) ++#if !__GLIBC_PREREQ(2,29) + static long gettid(void) { return syscall(__NR_gettid); } ++#endif ++#else ++static long gettid(void) { return syscall(__NR_gettid); } ++#endif + + void gpr_log(const char* file, int line, gpr_log_severity severity, + const char* format, ...) { -- cgit v1.2.3-54-g00ecf