libtracefs: Define gettid() when not defined
PATCH v2 1/1 libtracefs: Define gettid() when not defined
From: "Steven Rostedt (VMware)" <[email protected]>
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 (VMware) <[email protected]>
---
Changes since v1:
Using my personal laptop, I checked in under the wrong author/email. Fixed that.
src/tracefs-hist.c | 5 +++++ 1 file changed, 5 insertions(+)
src/tracefs-hist.c +5 -0
@@ -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;
Signature · 1 line
2.30.2