Merge "init: make chmod/mkdir/chown not follow symlinks"
diff --git a/adb/Android.mk b/adb/Android.mk
index 248208a..1a25106 100644
--- a/adb/Android.mk
+++ b/adb/Android.mk
@@ -95,16 +95,6 @@
# adbd device daemon
# =========================================================
-BUILD_ADBD := true
-
-# build adbd for the Linux simulator build
-# so we can use it to test the adb USB gadget driver on x86
-#ifeq ($(HOST_OS),linux)
-# BUILD_ADBD := true
-#endif
-
-
-ifeq ($(BUILD_ADBD),true)
include $(CLEAR_VARS)
LOCAL_SRC_FILES := \
@@ -127,12 +117,6 @@
LOCAL_CFLAGS := -O2 -g -DADB_HOST=0 -Wall -Wno-unused-parameter
LOCAL_CFLAGS += -D_XOPEN_SOURCE -D_GNU_SOURCE
-# TODO: This should probably be board specific, whether or not the kernel has
-# the gadget driver; rather than relying on the architecture type.
-ifeq ($(TARGET_ARCH),arm)
-LOCAL_CFLAGS += -DANDROID_GADGET=1
-endif
-
ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT)))
LOCAL_CFLAGS += -DALLOW_ADBD_ROOT=1
endif
@@ -146,8 +130,6 @@
LOCAL_STATIC_LIBRARIES := libcutils libc
include $(BUILD_EXECUTABLE)
-endif
-
# adb host tool for device-as-host
# =========================================================
diff --git a/include/cutils/list.h b/include/cutils/list.h
index 8190219..3881fc9 100644
--- a/include/cutils/list.h
+++ b/include/cutils/list.h
@@ -18,9 +18,10 @@
#define _CUTILS_LIST_H_
#include <stddef.h>
-#include <sys/cdefs.h>
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
struct listnode
{
@@ -51,6 +52,8 @@
#define list_head(list) ((list)->next)
#define list_tail(list) ((list)->prev)
-__END_DECLS
+#ifdef __cplusplus
+};
+#endif /* __cplusplus */
#endif
diff --git a/rootdir/init.rc b/rootdir/init.rc
index 438ac83..4905995 100644
--- a/rootdir/init.rc
+++ b/rootdir/init.rc
@@ -233,7 +233,8 @@
chown radio system /sys/android_power/acquire_full_wake_lock
chown radio system /sys/android_power/acquire_partial_wake_lock
chown radio system /sys/android_power/release_wake_lock
- chown radio system /sys/power/state
+ chown system system /sys/power/state
+ chown system system /sys/power/wakeup_count
chown radio system /sys/power/wake_lock
chown radio system /sys/power/wake_unlock
chmod 0660 /sys/power/state