aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Fabrice Fontaine <fontaine.fabrice@gmail.com>2019-09-05 19:04:03 +0200
committerGravatar Thomas Petazzoni <thomas.petazzoni@bootlin.com>2019-09-07 23:41:54 +0200
commit1a977137e91f59c4e8760e1d9e8d57b14e861ed4 (patch)
tree05d27f8a28444c5ceae58c8296ae3d381ae86254
parent534c9c73e2f30ac7c7e14ff732b364c178908f56 (diff)
downloadbuildroot-1a977137e91f59c4e8760e1d9e8d57b14e861ed4.tar.gz
buildroot-1a977137e91f59c4e8760e1d9e8d57b14e861ed4.tar.bz2
package/lttng-tools: fix build with glibc 2.30
Fixes: - http://autobuild.buildroot.org/results/8680c5a355b226cf978397615cbe5df1c5f8c656 Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
-rw-r--r--package/lttng-tools/0001-Fix-namespace-our-gettid-wrapper.patch66
1 files changed, 66 insertions, 0 deletions
diff --git a/package/lttng-tools/0001-Fix-namespace-our-gettid-wrapper.patch b/package/lttng-tools/0001-Fix-namespace-our-gettid-wrapper.patch
new file mode 100644
index 0000000000..218fad50c1
--- /dev/null
+++ b/package/lttng-tools/0001-Fix-namespace-our-gettid-wrapper.patch
@@ -0,0 +1,66 @@
+From 96415c0a3036b2764fcfb7e31e62246d9abd137f Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date: Thu, 5 Sep 2019 15:08:59 +0200
+Subject: [PATCH] Fix: namespace our gettid wrapper
+
+Since glibc 2.30, a gettid wrapper was added that conflicts with the
+static declaration. Namespace the wrapper so there is no conflict.
+
+Fixes:
+ - http://autobuild.buildroot.org/results/8680c5a355b226cf978397615cbe5df1c5f8c656
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+[Upstream status: https://github.com/lttng/lttng-tools/pull/154]
+---
+ src/common/compat/tid.h | 8 +++-----
+ src/common/error.h | 4 ++--
+ 2 files changed, 5 insertions(+), 7 deletions(-)
+
+diff --git a/src/common/compat/tid.h b/src/common/compat/tid.h
+index 40f562f9..abb63843 100644
+--- a/src/common/compat/tid.h
++++ b/src/common/compat/tid.h
+@@ -29,11 +29,9 @@
+ #include <syscall.h>
+ #endif
+
+-#if defined(_syscall0)
+-_syscall0(pid_t, gettid)
+-#elif defined(__NR_gettid)
++#if defined(__NR_gettid)
+ #include <unistd.h>
+-static inline pid_t gettid(void)
++static inline pid_t lttng_gettid(void)
+ {
+ return syscall(__NR_gettid);
+ }
+@@ -42,7 +40,7 @@ static inline pid_t gettid(void)
+ #include <unistd.h>
+
+ /* Fall-back on getpid for tid if not available. */
+-static inline pid_t gettid(void)
++static inline pid_t lttng_gettid(void)
+ {
+ return getpid();
+ }
+diff --git a/src/common/error.h b/src/common/error.h
+index c90c4ae0..3fe742c0 100644
+--- a/src/common/error.h
++++ b/src/common/error.h
+@@ -151,11 +151,11 @@ static inline void __lttng_print_check_abort(enum lttng_error_level type)
+ /* Three level of debug. Use -v, -vv or -vvv for the levels */
+ #define _ERRMSG(msg, type, fmt, args...) __lttng_print(type, msg \
+ " - %s [%ld/%ld]: " fmt " (in %s() at " __FILE__ ":" XSTR(__LINE__) ")\n", \
+- log_add_time(), (long) getpid(), (long) gettid(), ## args, __func__)
++ log_add_time(), (long) getpid(), (long) lttng_gettid(), ## args, __func__)
+
+ #define _ERRMSG_NO_LOC(msg, type, fmt, args...) __lttng_print(type, msg \
+ " - %s [%ld/%ld]: " fmt "\n", \
+- log_add_time(), (long) getpid(), (long) gettid(), ## args)
++ log_add_time(), (long) getpid(), (long) lttng_gettid(), ## args)
+
+ #define MSG(fmt, args...) \
+ __lttng_print(PRINT_MSG, fmt "\n", ## args)
+--
+2.23.0.rc1
+