From: David Woodhouse Date: Fri, 15 Jun 2012 12:45:13 +0000 (+0100) Subject: Fix Android build X-Git-Tag: v4.00~21 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=1d325e9e436a912976ca22bcd2102b3c1decf674;p=users%2Fdwmw2%2Fopenconnect.git Fix Android build Well, almost. My local NDK setup still fails to link because libicuuc.so needs libgabi++.so, and even with that it has undefined references to mbstowcs and wcstombs. But that's probably a local issue. Signed-off-by: David Woodhouse --- diff --git a/Android.mk b/Android.mk index a3707b12..e7dbcb28 100644 --- a/Android.mk +++ b/Android.mk @@ -4,11 +4,12 @@ LOCAL_PATH := $(call my-dir) # This list comes from the following variables in the normal Makefile.am: # $(openconnect_SOURCES) $(libopenconnect_la_SOURCES) $(noinst_HEADERS) common_SRC_FILES := \ - xml.c main.c dtls.c cstp.c mainloop.c tun.c \ - ssl.c http.c version.c auth.c library.c \ + xml.c main.c dtls.c cstp.c mainloop.c tun.c compat.c \ + ssl.c http.c version.c auth.c library.c openssl.c \ openconnect-internal.h openconnect.h -common_CFLAGS += -DANDROID -DIF_TUN_HDR="" +common_CFLAGS += -DANDROID -DANDROID_KEYSTORE -DIF_TUN_HDR="" \ + -DDEFAULT_VPNCSCRIPT=NULL -DHAVE_ASPRINTF -DOPENCONNECT_OPENSSL common_C_INCLUDES += \ $(JNI_H_INCLUDE) \ diff --git a/ssl.c b/ssl.c index 2303b6f8..32eecebb 100644 --- a/ssl.c +++ b/ssl.c @@ -34,7 +34,7 @@ #include #include #include -#if defined(__linux__) +#if defined(__linux__) || defined(ANDROID) #include #elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__) || defined(__APPLE__) #include