aboutsummaryrefslogtreecommitdiffstats
path: root/libsecril-compat
diff options
context:
space:
mode:
Diffstat (limited to 'libsecril-compat')
-rw-r--r--libsecril-compat/Android.mk17
-rw-r--r--libsecril-compat/secril-compat.c13
2 files changed, 30 insertions, 0 deletions
diff --git a/libsecril-compat/Android.mk b/libsecril-compat/Android.mk
new file mode 100644
index 0000000..ee6c91b
--- /dev/null
+++ b/libsecril-compat/Android.mk
@@ -0,0 +1,17 @@
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_SRC_FILES := \
+ secril-compat.c
+
+LOCAL_SHARED_LIBRARIES := \
+ libhardware_legacy \
+ libbinder
+
+LOCAL_CFLAGS := -Wall -Werror
+
+LOCAL_MODULE := libsecril-compat
+
+include $(BUILD_SHARED_LIBRARY)
diff --git a/libsecril-compat/secril-compat.c b/libsecril-compat/secril-compat.c
new file mode 100644
index 0000000..fc11450
--- /dev/null
+++ b/libsecril-compat/secril-compat.c
@@ -0,0 +1,13 @@
+#include <sys/types.h>
+
+/**
+ * With the switch to C++11 by default, char16_t became a unique type,
+ * rather than basically just a typedef of uint16_t. As a result, the
+ * compiler now mangles the symbol for writeString16 differently. Our
+ * RIL references the old symbol of course, not the new one.
+ */
+uintptr_t _ZN7android6Parcel13writeString16EPKDsj(void *instance, void *str, size_t len);
+uintptr_t _ZN7android6Parcel13writeString16EPKtj(void *instance, void *str, size_t len)
+{
+ return _ZN7android6Parcel13writeString16EPKDsj(instance, str, len);
+}