diff options
author | Khem Raj <raj.khem@gmail.com> | 2019-07-26 18:29:19 -0700 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2019-08-08 10:04:23 -0700 |
commit | f0797683d743b3b2edb4e7858a9b0d1321c2c3f0 (patch) | |
tree | 605ff270822b417a641fbb509ce9890c25595f44 /recipes-devtools/python/python-grpcio | |
parent | cd835c61426062f9da027565870122f3fb27d183 (diff) | |
download | meta-python2-f0797683d743b3b2edb4e7858a9b0d1321c2c3f0.tar.gz |
python-grpcio: Use gettid API from glibc 2.30+
(From meta-openembedded commit: 381508f909a1279a42dfb6e7a12a9da06a752312)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Tim Orling <ticotimo@gmail.com>
Diffstat (limited to 'recipes-devtools/python/python-grpcio')
-rw-r--r-- | recipes-devtools/python/python-grpcio/gettid.patch | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/recipes-devtools/python/python-grpcio/gettid.patch b/recipes-devtools/python/python-grpcio/gettid.patch new file mode 100644 index 0000000..fb15cf7 --- /dev/null +++ b/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@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, ...) { |