diff options
Diffstat (limited to 'main/jni')
-rw-r--r-- | main/jni/Android.mk | 4 | ||||
-rw-r--r-- | main/jni/jniglue.c | 11 |
2 files changed, 11 insertions, 4 deletions
diff --git a/main/jni/Android.mk b/main/jni/Android.mk index 0b35dabe..a9f9cec1 100644 --- a/main/jni/Android.mk +++ b/main/jni/Android.mk @@ -47,13 +47,11 @@ LOCAL_PATH := $(JNI_DIR) # The only real JNI libraries include $(CLEAR_VARS) LOCAL_LDLIBS := -llog -lz -LOCAL_CFLAGS = --std=c99 +LOCAL_CFLAGS = --std=c99 -DTARGET_ARCH_ABI=\"${TARGET_ARCH_ABI}\" LOCAL_SRC_FILES:= jniglue.c scan_ifs.c LOCAL_MODULE = opvpnutil include $(BUILD_SHARED_LIBRARY) - -# The only real JNI libraries include $(CLEAR_VARS) LOCAL_LDLIBS := -llog -lz LOCAL_CFLAGS = --std=c99 diff --git a/main/jni/jniglue.c b/main/jni/jniglue.c index 12e67543..bb5ec688 100644 --- a/main/jni/jniglue.c +++ b/main/jni/jniglue.c @@ -19,6 +19,15 @@ void android_openvpn_log(int level,const char* prefix,const char* prefix_sep,con __android_log_print(ANDROID_LOG_DEBUG,"openvpn","%s%s%s",prefix,prefix_sep,m1); } -void Java_de_blinkt_openvpn_core_NativeUtils_jniclose(JNIEnv *env,jclass jo, jint fd) { +void Java_de_blinkt_openvpn_core_NativeUtils_jniclose(JNIEnv *env,jclass jo, jint fd) +{ int ret = close(fd); } + + +//! Hack to get the current installed ABI of the libraries. See also https://github.com/schwabe/ics-openvpn/issues/391 +jstring Java_de_blinkt_openvpn_core_NativeUtils_getNativeAPI(JNIEnv *env, jclass jo) +{ + + return (*env)->NewStringUTF(env, TARGET_ARCH_ABI); +} |