diff options
author | Khem Raj <raj.khem@gmail.com> | 2019-07-27 08:58:49 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-07-31 13:50:46 +0100 |
commit | 01f3a0cd730519a3a3402082a53ed7814d58a427 (patch) | |
tree | 74fb895dd5bd8f9cd42b2c84817ac05473935f71 | |
parent | e72a75671d5b82edc09062415e09ebfdbfe5cfbe (diff) | |
download | poky-01f3a0cd730519a3a3402082a53ed7814d58a427.tar.gz |
lttng-tools: Fix build with glibc 2.30
(From OE-Core rev: 5abaf2a5c1e8707189c5f607a19170e031e1c480)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/recipes-kernel/lttng/lttng-tools/0001-check-for-gettid-API-during-configure.patch | 55 | ||||
-rw-r--r-- | meta/recipes-kernel/lttng/lttng-tools_2.10.7.bb | 1 |
2 files changed, 56 insertions, 0 deletions
diff --git a/meta/recipes-kernel/lttng/lttng-tools/0001-check-for-gettid-API-during-configure.patch b/meta/recipes-kernel/lttng/lttng-tools/0001-check-for-gettid-API-during-configure.patch new file mode 100644 index 0000000000..c494cee604 --- /dev/null +++ b/meta/recipes-kernel/lttng/lttng-tools/0001-check-for-gettid-API-during-configure.patch | |||
@@ -0,0 +1,55 @@ | |||
1 | From 69c62f5f3cc424b7dd0c8e4097743b39a9c48306 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Sat, 27 Jul 2019 08:48:13 -0700 | ||
4 | Subject: [lttng-tools][PATCH] check for gettid API during configure | ||
5 | |||
6 | Add support for gettid() provided by glibc 2.30+ | ||
7 | |||
8 | Since version 2.30 glibc provides gettid and it causes conflicts with | ||
9 | locally defined gettid(). Use the local definition of | ||
10 | gettid only if system gettid is not available. | ||
11 | |||
12 | https://sourceware.org/git/?p=glibc.git;a=blob_plain;f=NEWS;hb=HEAD<Paste> | ||
13 | |||
14 | Upstream-Status: Pending | ||
15 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
16 | --- | ||
17 | configure.ac | 2 +- | ||
18 | src/common/compat/tid.h | 3 ++- | ||
19 | 2 files changed, 3 insertions(+), 2 deletions(-) | ||
20 | |||
21 | diff --git a/configure.ac b/configure.ac | ||
22 | index 7b99f5c..e4bd82c 100644 | ||
23 | --- a/configure.ac | ||
24 | +++ b/configure.ac | ||
25 | @@ -190,7 +190,7 @@ AC_CHECK_HEADERS([ \ | ||
26 | # Basic functions check | ||
27 | AC_CHECK_FUNCS([ \ | ||
28 | atexit bzero clock_gettime dup2 fdatasync fls ftruncate \ | ||
29 | - gethostbyname gethostname getpagesize localtime_r memchr memset \ | ||
30 | + gethostbyname gethostname getpagesize gettid localtime_r memchr memset \ | ||
31 | mkdir munmap putenv realpath rmdir socket strchr strcspn strdup \ | ||
32 | strncasecmp strndup strnlen strpbrk strrchr strstr strtol strtoul \ | ||
33 | strtoull dirfd gethostbyname2 getipnodebyname epoll_create1 \ | ||
34 | diff --git a/src/common/compat/tid.h b/src/common/compat/tid.h | ||
35 | index 40f562f..aa07a85 100644 | ||
36 | --- a/src/common/compat/tid.h | ||
37 | +++ b/src/common/compat/tid.h | ||
38 | @@ -25,6 +25,7 @@ | ||
39 | #ifndef LTTNG_TID_H | ||
40 | #define LTTNG_TID_H | ||
41 | |||
42 | +#if !HAVE_GETTID | ||
43 | #ifdef __linux__ | ||
44 | #include <syscall.h> | ||
45 | #endif | ||
46 | @@ -47,5 +48,5 @@ static inline pid_t gettid(void) | ||
47 | return getpid(); | ||
48 | } | ||
49 | #endif | ||
50 | - | ||
51 | +#endif /* HAVE_GETTID */ | ||
52 | #endif /* LTTNG_TID_H */ | ||
53 | -- | ||
54 | 2.22.0 | ||
55 | |||
diff --git a/meta/recipes-kernel/lttng/lttng-tools_2.10.7.bb b/meta/recipes-kernel/lttng/lttng-tools_2.10.7.bb index 469ad111c4..aa6d19d0fa 100644 --- a/meta/recipes-kernel/lttng/lttng-tools_2.10.7.bb +++ b/meta/recipes-kernel/lttng/lttng-tools_2.10.7.bb | |||
@@ -34,6 +34,7 @@ SRC_URI = "https://lttng.org/files/lttng-tools/lttng-tools-${PV}.tar.bz2 \ | |||
34 | file://lttng-sessiond.service \ | 34 | file://lttng-sessiond.service \ |
35 | file://0001-Skip-when-testapp-is-not-present.patch \ | 35 | file://0001-Skip-when-testapp-is-not-present.patch \ |
36 | file://0002-Fix-check-for-lttng-modules-presence-before-testing.patch \ | 36 | file://0002-Fix-check-for-lttng-modules-presence-before-testing.patch \ |
37 | file://0001-check-for-gettid-API-during-configure.patch \ | ||
37 | " | 38 | " |
38 | 39 | ||
39 | SRC_URI[md5sum] = "e7804d10e4cade381e241601f6047373" | 40 | SRC_URI[md5sum] = "e7804d10e4cade381e241601f6047373" |