diff options
author | Elliott Hughes <enh@google.com> | 2015-01-12 14:33:04 -0800 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2015-01-12 14:33:04 -0800 |
commit | 1bf248123399daf8d4bee9c30ba13b9887e5001e (patch) | |
tree | 055e3fdc43d09f7d30253638bbd84507cfd171a0 /libs/androidfw/misc.cpp | |
parent | 837261cc997cbb188de05e3d1194adb91cb75825 (diff) |
Use more intention-revealing tests for S_ISLNK and S_ISSOCK.
Change-Id: Ia7f13eb7d5a36cf2b4c0a253b2b4d7f7af396951
Diffstat (limited to 'libs/androidfw/misc.cpp')
-rw-r--r-- | libs/androidfw/misc.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libs/androidfw/misc.cpp b/libs/androidfw/misc.cpp index 29686efe3753..a9b46d2808f2 100644 --- a/libs/androidfw/misc.cpp +++ b/libs/androidfw/misc.cpp @@ -56,9 +56,11 @@ FileType getFileType(const char* fileName) return kFileTypeBlockDev; else if (S_ISFIFO(sb.st_mode)) return kFileTypeFifo; -#ifdef HAVE_SYMLINKS +#if defined(S_ISLNK) else if (S_ISLNK(sb.st_mode)) return kFileTypeSymlink; +#endif +#if defined(S_ISSOCK) else if (S_ISSOCK(sb.st_mode)) return kFileTypeSocket; #endif |