Merge "Fix libthread_db linkage"
diff --git a/libc/kernel/common/linux/cpcap_audio.h b/libc/kernel/common/linux/cpcap_audio.h
index 33d8439..5879567 100644
--- a/libc/kernel/common/linux/cpcap_audio.h
+++ b/libc/kernel/common/linux/cpcap_audio.h
@@ -18,14 +18,15 @@
#define CPCAP_AUDIO_OUT_SPEAKER 0
#define CPCAP_AUDIO_OUT_HEADSET 1
-#define CPCAP_AUDIO_OUT_MAX 1
+#define CPCAP_AUDIO_OUT_HEADSET_AND_SPEAKER 2
+#define CPCAP_AUDIO_OUT_MAX 2
-struct cpcap_audio_output {
- int id;
+struct cpcap_audio_stream {
+ unsigned id;
int on;
};
-#define CPCAP_AUDIO_OUT_SET_OUTPUT _IOW(CPCAP_AUDIO_MAGIC, 0, struct cpcap_audio_output *)
+#define CPCAP_AUDIO_OUT_SET_OUTPUT _IOW(CPCAP_AUDIO_MAGIC, 0, const struct cpcap_audio_stream *)
#define CPCAP_AUDIO_OUT_VOL_MIN 0
#define CPCAP_AUDIO_OUT_VOL_MAX 15
@@ -39,9 +40,9 @@
#define CPCAP_AUDIO_IN_MIC2 1
#define CPCAP_AUDIO_IN_MAX 1
-#define CPCAP_AUDIO_IN_SET_INPUT _IOW(CPCAP_AUDIO_MAGIC, 4, unsigned int)
+#define CPCAP_AUDIO_IN_SET_INPUT _IOW(CPCAP_AUDIO_MAGIC, 4, const struct cpcap_audio_stream *)
-#define CPCAP_AUDIO_IN_GET_INPUT _IOR(CPCAP_AUDIO_MAGIC, 5, unsigned int *)
+#define CPCAP_AUDIO_IN_GET_INPUT _IOR(CPCAP_AUDIO_MAGIC, 5, struct cpcap_audio_stream *)
#define CPCAP_AUDIO_IN_VOL_MIN 0
#define CPCAP_AUDIO_IN_VOL_MAX 31
diff --git a/libc/string/memccpy.c b/libc/string/memccpy.c
index 2689e80..789fde6 100644
--- a/libc/string/memccpy.c
+++ b/libc/string/memccpy.c
@@ -38,18 +38,9 @@
for (;;) {
if (ch == c || p >= p_end) break;
*q++ = ch = *p++;
-
- if (ch == c || p >= p_end) break;
- *q++ = ch = *p++;
-
- if (ch == c || p >= p_end) break;
- *q++ = ch = *p++;
-
- if (ch == c || p >= p_end) break;
- *q++ = ch = *p++;
}
- if (p >= p_end)
+ if (p >= p_end && ch != c)
return NULL;
return q;
diff --git a/libc/zoneinfo/Android.mk b/libc/zoneinfo/Android.mk
index 2f36f9b..ef700e8 100644
--- a/libc/zoneinfo/Android.mk
+++ b/libc/zoneinfo/Android.mk
@@ -12,3 +12,15 @@
ALL_PREBUILT += $(TARGET_OUT)/usr/share/zoneinfo/zoneinfo.version
$(TARGET_OUT)/usr/share/zoneinfo/zoneinfo.version : $(LOCAL_PATH)/zoneinfo.version | $(ACP)
$(transform-prebuilt-to-target)
+
+# The host build doesn't use bionic, but it does use bionic's zoneinfo data
+ifeq ($(WITH_HOST_DALVIK),true)
+ ALL_PREBUILT += $(HOST_OUT)/usr/share/zoneinfo/zoneinfo.dat
+ $(eval $(call copy-one-file,$(LOCAL_PATH)/zoneinfo.dat,$(HOST_OUT)/usr/share/zoneinfo/zoneinfo.dat))
+
+ ALL_PREBUILT += $(HOST_OUT)/usr/share/zoneinfo/zoneinfo.idx
+ $(eval $(call copy-one-file,$(LOCAL_PATH)/zoneinfo.idx,$(HOST_OUT)/usr/share/zoneinfo/zoneinfo.idx))
+
+ ALL_PREBUILT += $(HOST_OUT)/usr/share/zoneinfo/zoneinfo.version
+ $(eval $(call copy-one-file,$(LOCAL_PATH)/zoneinfo.version,$(HOST_OUT)/usr/share/zoneinfo/zoneinfo.version))
+endif