[oe-commits] [meta-openembedded] 09/26: python-grpcio: Use gettid API from glibc 2.30+

git at git.openembedded.org git at git.openembedded.org
Thu Aug 8 21:55:13 UTC 2019


This is an automated email from the git hooks/post-receive script.

khem pushed a commit to branch master-next
in repository meta-openembedded.

commit 381508f909a1279a42dfb6e7a12a9da06a752312
Author: Khem Raj <raj.khem at gmail.com>
AuthorDate: Fri Jul 26 18:29:19 2019 -0700

    python-grpcio: Use gettid API from glibc 2.30+
    
    Signed-off-by: Khem Raj <raj.khem at gmail.com>
---
 .../recipes-devtools/python/python-grpcio.inc      |  1 +
 .../python/python-grpcio/gettid.patch              | 26 ++++++++++++++++++++++
 2 files changed, 27 insertions(+)

diff --git a/meta-python/recipes-devtools/python/python-grpcio.inc b/meta-python/recipes-devtools/python/python-grpcio.inc
index fd341f5..7d3675c 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:"
 SRC_URI_append_class-target = " file://0001-setup.py-Do-not-mix-C-and-C-compiler-options.patch \
                                 file://ppc-boringssl-support.patch \
                                 file://riscv64_support.patch \
+                                file://gettid.patch \
 "
 
 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 0000000..fb15cf7
--- /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 <raj.khem at gmail.com>
+--- a/src/core/lib/gpr/log_linux.cc
++++ b/src/core/lib/gpr/log_linux.cc
+@@ -40,7 +40,13 @@
+ #include <time.h>
+ #include <unistd.h>
+ 
++#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, ...) {

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list