summaryrefslogtreecommitdiffstats
path: root/libs
diff options
context:
space:
mode:
Diffstat (limited to 'libs')
-rw-r--r--libs/androidfw/Android.mk3
-rw-r--r--libs/androidfw/ResourceTypes.cpp4
2 files changed, 5 insertions, 2 deletions
diff --git a/libs/androidfw/Android.mk b/libs/androidfw/Android.mk
index 3ed75a2..018ed40 100644
--- a/libs/androidfw/Android.mk
+++ b/libs/androidfw/Android.mk
@@ -52,6 +52,8 @@ LOCAL_MODULE:= libandroidfw
LOCAL_MODULE_TAGS := optional
+LOCAL_CFLAGS += -DSTATIC_ANDROIDFW_FOR_TOOLS
+
LOCAL_C_INCLUDES := \
external/zlib
@@ -92,6 +94,7 @@ include $(BUILD_SHARED_LIBRARY)
ifeq ($(TARGET_OS),linux)
include $(CLEAR_VARS)
+LOCAL_CFLAGS += -DSTATIC_ANDROIDFW_FOR_TOOLS
LOCAL_C_INCLUDES += \
external/skia/include/core \
external/zlib \
diff --git a/libs/androidfw/ResourceTypes.cpp b/libs/androidfw/ResourceTypes.cpp
index a730065..9c58513 100644
--- a/libs/androidfw/ResourceTypes.cpp
+++ b/libs/androidfw/ResourceTypes.cpp
@@ -5324,7 +5324,7 @@ bool ResTable::getIdmapInfo(const void* idmap, size_t sizeBytes,
}
-#ifndef HAVE_ANDROID_OS
+#ifdef STATIC_ANDROIDFW_FOR_TOOLS
#define CHAR16_TO_CSTR(c16, len) (String8(String16(c16,len)).string())
#define CHAR16_ARRAY_EQ(constant, var, len) \
@@ -5621,6 +5621,6 @@ void ResTable::print(bool inclValues) const
}
}
-#endif // HAVE_ANDROID_OS
+#endif // STATIC_ANDROIDFW_FOR_TOOLS
} // namespace android