@@ -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 \
new file mode 100644
@@ -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@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, ...) {
Signed-off-by: Khem Raj <raj.khem@gmail.com> --- .../recipes-devtools/python/python-grpcio.inc | 1 + .../python/python-grpcio/gettid.patch | 26 +++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 meta-python/recipes-devtools/python/python-grpcio/gettid.patch -- 2.22.0 -- _______________________________________________ Openembedded-devel mailing list Openembedded-devel@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-devel