]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Don't use non-POSIX S_ISLNK macro
authorJoel Rosdahl <joel@rosdahl.net>
Tue, 12 Jul 2016 20:44:37 +0000 (22:44 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Tue, 12 Jul 2016 20:44:37 +0000 (22:44 +0200)
For portability.

ccache.c

index b8147b580ded8e0e827000b6da0be41d6498d5f5..4d0ffc3e9ed786d9029da69e8b8d11390d56d256 100644 (file)
--- a/ccache.c
+++ b/ccache.c
@@ -2805,7 +2805,7 @@ cc_process_args(struct args *args, struct args **preprocessor_args,
                }
 
                lstat(argv[i], &st);
-               if (S_ISLNK(st.st_mode)) {
+               if ((st.st_mode & S_IFMT) == S_IFLNK) {
                        /* Don't rewrite source file path if it's a symlink since
                           make_relative_path resolves symlinks using realpath(3) and this leads
                           to potentially choosing incorrect relative header files. See the