summaryrefslogtreecommitdiff
path: root/community/apitrace/gcc-4.7-fix.patch
blob: 20cc71a3ad9195f19df728fa88a3e032d5415767 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
From 8159d6c1295da8c1b342bc77686e7ecfed1e5c01 Mon Sep 17 00:00:00 2001
From: Martin Olsson <martin@minimum.se>
Date: Mon, 26 Mar 2012 10:40:45 +0200
Subject: [PATCH] Fix compile error "isatty was not declared"; missing
 unistd.h include
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

When I built apitrace on Fedora 16, using the usual:

	cmake -H. -Bbuild
	make -C build

...then I got this compile error:

	apitrace/cli/cli_dump.cpp: In function ‘int command(int, char**)’:
	apitrace/cli/cli_dump.cpp:176:25: error: ‘isatty’ was not declared in this scope
---
 cli/cli_dump.cpp |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/cli/cli_dump.cpp b/cli/cli_dump.cpp
index 28c91af..f52b83c 100644
--- a/cli/cli_dump.cpp
+++ b/cli/cli_dump.cpp
@@ -28,6 +28,9 @@
 #include <string.h>
 #include <limits.h> // for CHAR_MAX
 #include <getopt.h>
+#ifndef _WIN32
+#include <unistd.h> // for isatty()
+#endif
 
 #include "cli.hpp"
 #include "cli_pager.hpp"
-- 
1.7.10