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 | 381508f909a1279a42dfb6e7a12a9da06a752312 (patch) | |
tree | a927c19b5f1d4d117f6ceb8fe2e0d2d4ee316d98 /meta-python/recipes-devtools/python/python-grpcio/gettid.patch | |
parent | 5f05cba746edc15d674c870262bc1c5bce23f2c4 (diff) | |
download | meta-openembedded-381508f909a1279a42dfb6e7a12a9da06a752312.tar.gz |
python-grpcio: Use gettid API from glibc 2.30+
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-python/recipes-devtools/python/python-grpcio/gettid.patch')
-rw-r--r-- | meta-python/recipes-devtools/python/python-grpcio/gettid.patch | 26 |
1 files changed, 26 insertions, 0 deletions
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, ...) { | ||