lkml.org 
[lkml]   [2011]   [Nov]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] perf: Fix implicit declaration of getline in util/probe-finder.c
Date
On my older build machine I get the following failure:

CC util/probe-finder.o
cc1: warnings being treated as errors
util/probe-finder.c: In function 'find_lazy_match_lines':
util/probe-finder.c:864: warning: implicit declaration of function 'getline'
util/probe-finder.c:864: warning: nested extern declaration of 'getline'
make: *** [util/probe-finder.o] Error 1

This is a similar problem to the one resolved with git commit: 69e3f52d.
As with that fix I'm using util.h to provide the necessary inclusions as well
as handling _GNU_SOURCE.

Signed-off-by: Josh Hunt <johunt@akamai.com>
---
tools/perf/util/probe-finder.c | 12 +-----------
1 files changed, 1 insertions(+), 11 deletions(-)

diff --git a/tools/perf/util/probe-finder.c b/tools/perf/util/probe-finder.c
index 5d73262..0f33926 100644
--- a/tools/perf/util/probe-finder.c
+++ b/tools/perf/util/probe-finder.c
@@ -19,24 +19,14 @@
*
*/

+#include "util.h"
#include <sys/utsname.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <stdio.h>
-#include <unistd.h>
#include <getopt.h>
-#include <stdlib.h>
-#include <string.h>
-#include <stdarg.h>
-#include <ctype.h>
#include <dwarf-regs.h>

#include <linux/bitops.h>
#include "event.h"
#include "debug.h"
-#include "util.h"
#include "symbol.h"
#include "probe-finder.h"

--
1.7.0.4


\
 
 \ /
  Last update: 2011-11-11 16:57    [W:0.027 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site