lkml.org 
[lkml]   [2013]   [Oct]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH trace-cmd 3/5] Add missing libgen.h includes
Date
This is needed for basname(). Without the include the compiler
may assume that basename() returns int, which leads to a segfault
in some cases.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
---
kernel-shark.c | 1 +
trace-graph-main.c | 1 +
trace-view-main.c | 1 +
3 files changed, 3 insertions(+)

diff --git a/kernel-shark.c b/kernel-shark.c
index ee4796a..0201427 100644
--- a/kernel-shark.c
+++ b/kernel-shark.c
@@ -28,6 +28,7 @@
#include <gtk/gtk.h>
#include <errno.h>
#include <getopt.h>
+#include <libgen.h>

#include "trace-compat.h"
#include "trace-capture.h"
diff --git a/trace-graph-main.c b/trace-graph-main.c
index 1bc10c1..3654295 100644
--- a/trace-graph-main.c
+++ b/trace-graph-main.c
@@ -23,6 +23,7 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
+#include <libgen.h>

#include "trace-cmd.h"
#include "trace-graph.h"
diff --git a/trace-view-main.c b/trace-view-main.c
index 73dfa8a..935b8c1 100644
--- a/trace-view-main.c
+++ b/trace-view-main.c
@@ -23,6 +23,7 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
+#include <libgen.h>

#include "trace-cmd.h"
#include "trace-view.h"
--
1.8.3.2


\
 
 \ /
  Last update: 2013-10-24 21:41    [W:0.107 / U:1.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site