All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] libtracefs: Define gettid() when not defined
@ 2021-08-25 23:45 Steven Rostedt
  0 siblings, 0 replies; only message in thread
From: Steven Rostedt @ 2021-08-25 23:45 UTC (permalink / raw)
  To: Linux Trace Devel

From: Steven Rostedt <rostedt@rorschach.local.home>

tracefs-hist.c uses the gettid() system call, but older glibcs do not
define it. Define the system call when it is not already defined.

Signed-off-by: Steven Rostedt <rostedt@rorschach.local.home>
---
 src/tracefs-hist.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/tracefs-hist.c b/src/tracefs-hist.c
index 003715f..c0d3049 100644
--- a/src/tracefs-hist.c
+++ b/src/tracefs-hist.c
@@ -24,6 +24,11 @@
 #define ASCENDING ".ascending"
 #define DESCENDING ".descending"
 
+#ifndef gettid
+# include <sys/syscall.h>
+# define gettid() syscall(__NR_gettid)
+#endif
+
 struct tracefs_hist {
 	struct tep_handle	*tep;
 	struct tep_event	*event;
-- 
2.30.2


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-08-25 23:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-25 23:45 [PATCH] libtracefs: Define gettid() when not defined Steven Rostedt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.