diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2010-03-04 17:11:58 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2010-03-04 17:11:58 +0000 |
commit | e1f0c2e73fa8cda9e38ab182288201fa27a3b363 (patch) | |
tree | 72e75b0a70b5269bc9c76e9c4c558ec0365496fd /perf/cairo-perf-trace.c | |
parent | 271752b944ef0898b5d1be57f26de83c8e40ae3a (diff) | |
download | cairo-e1f0c2e73fa8cda9e38ab182288201fa27a3b363.tar.gz |
perf: Check for and include unistd.h
isatty() and access() require unistd.h, so include it!
Diffstat (limited to 'perf/cairo-perf-trace.c')
-rw-r--r-- | perf/cairo-perf-trace.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/perf/cairo-perf-trace.c b/perf/cairo-perf-trace.c index 5487eaf66..cc0115830 100644 --- a/perf/cairo-perf-trace.c +++ b/perf/cairo-perf-trace.c @@ -53,6 +53,10 @@ #include <sys/stat.h> #include <dirent.h> +#if HAVE_UNISTD_H +#include <unistd.h> +#endif + #include <signal.h> #if HAVE_FCFINI @@ -671,8 +675,10 @@ parse_options (cairo_perf_t *perf, int argc, char *argv[]) if (verbose && perf->summary == NULL) perf->summary = stderr; +#if HAVE_UNISTD_H if (perf->summary && isatty (fileno (perf->summary))) perf->summary_continuous = TRUE; +#endif if (optind < argc) { perf->names = &argv[optind]; @@ -702,9 +708,11 @@ have_trace_filenames (cairo_perf_t *perf) if (perf->num_names == 0) return FALSE; +#if HAVE_UNISTD_H for (i = 0; i < perf->num_names; i++) if (access (perf->names[i], R_OK) == 0) return TRUE; +#endif return FALSE; } |