new file mode 100644
@@ -0,0 +1,19 @@
+LOCAL_PATH := $(call my-dir)
+include $(CLEAR_VARS)
+
+
+LOCAL_MODULE_TAGS := optional
+LOCAL_SHARED_LIBRARIES := libstlport
+
+#LOCAL_STATIC_LIBRARIES := libncurses
+
+LOCAL_MODULE := cpu_topology
+
+#LOCAL_CPPFLAGS += -DDEFINE_ETHTOOL_CMD \
+
+LOCAL_C_INCLUDES += bionic \
+
+LOCAL_SRC_FILES += \
+ topology.c
+
+include $(BUILD_EXECUTABLE)
@@ -336,8 +336,10 @@ static inline void list_splice_tail_init(struct list_head *list,
}
}
+#undef offsetof
#define offsetof(s, m) ((size_t)&(((s *)0)->m))
+#undef container_of
#define container_of(ptr, type, member) ({ \
const typeof(((type *)0)->member) * __mptr = (ptr); \
(type *)((char *)__mptr - offsetof(type, member)); })
@@ -297,10 +297,6 @@ static int folder_scan(char *path, folder_filter_t filter)
if (ret < 0)
return -1;
- ret = basename(basedir) ? 0 : -1;
- if (ret < 0)
- goto out_free_basedir;
-
while (!readdir_r(dir, &dirent, &direntp)) {
if (!direntp)
add Android.mk, so we can build it on android platform. Signed-off-by: Shaojie Sun <shaojie.sun@linaro.com> --- Android.mk | 19 +++++++++++++++++++ list.h | 2 ++ topology.c | 4 ---- 3 files changed, 21 insertions(+), 4 deletions(-) create mode 100644 Android.mk