summaryrefslogtreecommitdiff
path: root/cli
diff options
context:
space:
mode:
authorMartin Olsson <martin@minimum.se>2012-03-26 10:40:45 +0200
committerJosé Fonseca <jose.r.fonseca@gmail.com>2012-03-29 07:41:51 +0100
commitbdd9281dd964c36ac94ef3a9fd5d4f7dd24a3d06 (patch)
treecadb0085360c34eb03b695e61d1ffbd9bd86a7fd /cli
parent126f64b9a44bfa5432c30a48f13dfa98f4a1a9f4 (diff)
Fix compile error "isatty was not declared"; missing unistd.h include
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
Diffstat (limited to 'cli')
-rw-r--r--cli/cli_dump.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/cli/cli_dump.cpp b/cli/cli_dump.cpp
index 28c91af9..f52b83c3 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"