[PATCH] libtracefs: Add missing system includes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
Signed-off-by: Tzvetomir Stoyanov (VMware) <tz.stoyanov@xxxxxxxxx>
---
 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




[Index of Archives]     [Linux USB Development]     [Linux USB Development]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux