linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] libtracefs: Add missing system includes
@ 2021-01-26 16:12 Tzvetomir Stoyanov (VMware)
       [not found] ` <CAK7tX=YU-R_agm-_XQFu1=Z_dvm92uMZ3CkPJGbwzPGVJ2SUTg@mail.gmail.com>
  0 siblings, 1 reply; 2+ messages in thread
From: Tzvetomir Stoyanov (VMware) @ 2021-01-26 16:12 UTC (permalink / raw)
  To: rostedt, y.karadz; +Cc: linux-trace-devel

Some libtracefs APIs use defines from Linux system headers. These
headers are not included in the tracefs library main header file, which
causes compilation errors when these APIs are used and the required
system headers are not included explicitly by the caller.

Reported-by: Yordan Karadzhov (VMware) <y.karadz@gmail.com>
Signed-off-by: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>
---
 include/tracefs.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/include/tracefs.h b/include/tracefs.h
index 3059dbb..f3eec62 100644
--- a/include/tracefs.h
+++ b/include/tracefs.h
@@ -6,8 +6,10 @@
 #ifndef _TRACE_FS_H
 #define _TRACE_FS_H
 
-#include <traceevent/event-parse.h>
+#include <sys/stat.h>
+#include <fcntl.h>
 #include <sched.h>
+#include <traceevent/event-parse.h>
 
 char *tracefs_get_tracing_file(const char *name);
 void tracefs_put_tracing_file(char *name);
-- 
2.29.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-01-27  4:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-26 16:12 [PATCH] libtracefs: Add missing system includes Tzvetomir Stoyanov (VMware)
     [not found] ` <CAK7tX=YU-R_agm-_XQFu1=Z_dvm92uMZ3CkPJGbwzPGVJ2SUTg@mail.gmail.com>
2021-01-26 16:58   ` Tzvetomir Stoyanov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).