linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Tzvetomir Stoyanov (VMware)" <tz.stoyanov@gmail.com>
To: rostedt@goodmis.org, y.karadz@gmail.com
Cc: linux-trace-devel@vger.kernel.org
Subject: [PATCH] libtracefs: Add missing system includes
Date: Tue, 26 Jan 2021 18:12:09 +0200	[thread overview]
Message-ID: <20210126161209.1086179-1-tz.stoyanov@gmail.com> (raw)

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


             reply	other threads:[~2021-01-26 16:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-26 16:12 Tzvetomir Stoyanov (VMware) [this message]
     [not found] ` <CAK7tX=YU-R_agm-_XQFu1=Z_dvm92uMZ3CkPJGbwzPGVJ2SUTg@mail.gmail.com>
2021-01-26 16:58   ` [PATCH] libtracefs: Add missing system includes Tzvetomir Stoyanov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210126161209.1086179-1-tz.stoyanov@gmail.com \
    --to=tz.stoyanov@gmail.com \
    --cc=linux-trace-devel@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=y.karadz@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).