aboutsummaryrefslogtreecommitdiff
path: root/android/olm-sdk/src
diff options
context:
space:
mode:
Diffstat (limited to 'android/olm-sdk/src')
-rw-r--r--android/olm-sdk/src/main/jni/Android.mk3
-rw-r--r--android/olm-sdk/src/main/jni/Application.mk4
-rw-r--r--android/olm-sdk/src/main/jni/olm_jni.h1
3 files changed, 6 insertions, 2 deletions
diff --git a/android/olm-sdk/src/main/jni/Android.mk b/android/olm-sdk/src/main/jni/Android.mk
index aceaef0..44a2787 100644
--- a/android/olm-sdk/src/main/jni/Android.mk
+++ b/android/olm-sdk/src/main/jni/Android.mk
@@ -21,6 +21,9 @@ LOCAL_CFLAGS+= -DOLMLIB_VERSION_MAJOR=$(MAJOR) \
#LOCAL_CFLAGS+= -DNDK_DEBUG
+LOCAL_CFLAGS+=-fstack-protector-all -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Wall
+LOCAL_LDFLAGS=-z relro -z now
+
LOCAL_C_INCLUDES+= $(LOCAL_PATH)/$(SRC_ROOT_DIR)/include/ \
$(LOCAL_PATH)/$(SRC_ROOT_DIR)/lib
diff --git a/android/olm-sdk/src/main/jni/Application.mk b/android/olm-sdk/src/main/jni/Application.mk
index 6516f5e..e11f39a 100644
--- a/android/olm-sdk/src/main/jni/Application.mk
+++ b/android/olm-sdk/src/main/jni/Application.mk
@@ -1,3 +1,3 @@
APP_PLATFORM := android-16
-APP_ABI := arm64-v8a armeabi-v7a armeabi x86_64 x86
-APP_STL := gnustl_static \ No newline at end of file
+APP_ABI := arm64-v8a armeabi-v7a x86_64 x86
+APP_STL := gnustl_static
diff --git a/android/olm-sdk/src/main/jni/olm_jni.h b/android/olm-sdk/src/main/jni/olm_jni.h
index e6a49e2..6a5eb1d 100644
--- a/android/olm-sdk/src/main/jni/olm_jni.h
+++ b/android/olm-sdk/src/main/jni/olm_jni.h
@@ -21,6 +21,7 @@
#include <cstdlib>
#include <cstdio>
#include <string>
+#include <string.h>
#include <sstream>
#include <jni.h>
#include <android/log.h>