diff options
Diffstat (limited to 'gcc/gcov-tool.c')
-rw-r--r-- | gcc/gcov-tool.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/gcc/gcov-tool.c b/gcc/gcov-tool.c index 0f97b53..d63ad1c 100644 --- a/gcc/gcov-tool.c +++ b/gcc/gcov-tool.c @@ -35,7 +35,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #include <stdio.h> #include <sys/stat.h> #include <unistd.h> +#if HAVE_FTW_H #include <ftw.h> +#endif #include <getopt.h> extern int gcov_profile_merge (struct gcov_info*, struct gcov_info*, int, int); @@ -49,6 +51,8 @@ extern void gcov_set_verbose (void); /* Set to verbose output mode. */ static bool verbose; +#if HAVE_FTW_H + /* Remove file NAME if it has a gcda suffix. */ static int @@ -69,13 +73,18 @@ unlink_gcda_file (const char *name, return ret; } +#endif /* Remove the gcda files in PATH recursively. */ static int -unlink_profile_dir (const char *path) +unlink_profile_dir (const char *path ATTRIBUTE_UNUSED) { +#if HAVE_FTW_H return nftw(path, unlink_gcda_file, 64, FTW_DEPTH | FTW_PHYS); +#else + return -1; +#endif } /* Output GCOV_INFO lists PROFILE to directory OUT. Note that |