diff options
author | Elliott Hughes <enh@google.com> | 2015-01-13 01:18:48 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-01-13 01:18:48 +0000 |
commit | d6c475dc246b1681f5c9af9e00ac74183812329c (patch) | |
tree | bd2b74790281c07c87ee7b7ee58c9571d9b2a01e /libs/androidfw/misc.cpp | |
parent | cc9efb78fadfb63538cb1c50577440dcf617ffdb (diff) | |
parent | 595ae39f7f484eb5d2d9e21feeff7e97114b744a (diff) |
am 595ae39f: Merge "Use more intention-revealing tests for S_ISLNK and S_ISSOCK."
* commit '595ae39f7f484eb5d2d9e21feeff7e97114b744a':
Use more intention-revealing tests for S_ISLNK and S_ISSOCK.
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 |