summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/lttng
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2019-07-27 08:58:49 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-07-31 13:50:46 +0100
commit01f3a0cd730519a3a3402082a53ed7814d58a427 (patch)
tree74fb895dd5bd8f9cd42b2c84817ac05473935f71 /meta/recipes-kernel/lttng
parente72a75671d5b82edc09062415e09ebfdbfe5cfbe (diff)
downloadpoky-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>
Diffstat (limited to 'meta/recipes-kernel/lttng')
-rw-r--r--meta/recipes-kernel/lttng/lttng-tools/0001-check-for-gettid-API-during-configure.patch55
-rw-r--r--meta/recipes-kernel/lttng/lttng-tools_2.10.7.bb1
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 @@
1From 69c62f5f3cc424b7dd0c8e4097743b39a9c48306 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 27 Jul 2019 08:48:13 -0700
4Subject: [lttng-tools][PATCH] check for gettid API during configure
5
6Add support for gettid() provided by glibc 2.30+
7
8Since version 2.30 glibc provides gettid and it causes conflicts with
9locally defined gettid(). Use the local definition of
10gettid only if system gettid is not available.
11
12https://sourceware.org/git/?p=glibc.git;a=blob_plain;f=NEWS;hb=HEAD<Paste>
13
14Upstream-Status: Pending
15Signed-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
21diff --git a/configure.ac b/configure.ac
22index 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 \
34diff --git a/src/common/compat/tid.h b/src/common/compat/tid.h
35index 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--
542.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
39SRC_URI[md5sum] = "e7804d10e4cade381e241601f6047373" 40SRC_URI[md5sum] = "e7804d10e4cade381e241601f6047373"