summaryrefslogtreecommitdiffstats
path: root/libs/androidfw
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2015-01-13 01:32:37 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-01-13 01:32:37 +0000
commit1e14722167210e176cc1f6e702f1a7a98271c6d2 (patch)
tree8f5934e5c190670cf8e9fadcc047a54820328a56 /libs/androidfw
parent5849c0e4c6f8bf44de44e964ce365c0959070494 (diff)
parentd6c475dc246b1681f5c9af9e00ac74183812329c (diff)
downloadframeworks_base-1e14722167210e176cc1f6e702f1a7a98271c6d2.zip
frameworks_base-1e14722167210e176cc1f6e702f1a7a98271c6d2.tar.gz
frameworks_base-1e14722167210e176cc1f6e702f1a7a98271c6d2.tar.bz2
am d6c475dc: am 595ae39f: Merge "Use more intention-revealing tests for S_ISLNK and S_ISSOCK."
* commit 'd6c475dc246b1681f5c9af9e00ac74183812329c': Use more intention-revealing tests for S_ISLNK and S_ISSOCK.
Diffstat (limited to 'libs/androidfw')
-rw-r--r--libs/androidfw/misc.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/libs/androidfw/misc.cpp b/libs/androidfw/misc.cpp
index ea54cc5..5285420 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