[PATCH] perf: Fix implicit declaration of getline in util/probe-finder.c

From: Josh Hunt
Date: Fri Nov 11 2011 - 10:55:11 EST


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@xxxxxxxxxx>
---
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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/