The latter doesn't appear to be set by the NDK.
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
$(OPENCONNECT_BUILD)/Makefile: $(GNUTLS_DEPS) $(LIBXML_DEPS) ../configure
mkdir -p $(OPENCONNECT_BUILD)
cd $(OPENCONNECT_BUILD) && ../../../configure $(CONFIGURE_ARGS) \
- CFLAGS="--sysroot=$(NDK_SYSROOT) -DNO_BROKEN_DTLS_CHECK -DANDROID" \
+ CFLAGS="--sysroot=$(NDK_SYSROOT) -DNO_BROKEN_DTLS_CHECK" \
GNUTLS_LIBS="$(shell PKG_CONFIG_LIBDIR=$(OC_SYSROOT)/lib/pkgconfig pkg-config --static --libs gnutls)" --enable-shared
openconnect: $(OPENCONNECT_BUILD)/Makefile
#endif
#include <stdio.h>
-#ifdef ANDROID
+#ifdef __ANDROID__
#include <android/log.h>
#else
#include <syslog.h>
exit(1);
if (use_syslog) {
-#ifndef ANDROID
+#ifndef __ANDROID__
openlog("openconnect", LOG_PID, LOG_DAEMON);
#endif
vpninfo->progress = syslog_progress;
}
}
-#ifdef ANDROID
+#ifdef __ANDROID__
void syslog_progress(void *_vpninfo, int level, const char *fmt, ...)
{
static int l[4] = {
va_end(args2);
}
}
-#else /* !ANDROID */
+#else /* !__ANDROID__ */
void syslog_progress(void *_vpninfo, int level, const char *fmt, ...)
{
int priority = level ? LOG_INFO : LOG_NOTICE;
openconnect_SSL_printf(struct openconnect_info *vpninfo, const char *fmt, ...);
int openconnect_print_err_cb(const char *str, size_t len, void *ptr);
#define openconnect_report_ssl_errors(v) ERR_print_errors_cb(openconnect_print_err_cb, (v))
-#if defined(FAKE_ANDROID_KEYSTORE) || defined(ANDROID)
+#if defined(FAKE_ANDROID_KEYSTORE) || defined(__ANDROID__)
#define ANDROID_KEYSTORE
#endif
#ifdef ANDROID_KEYSTORE
}
return 0;
}
-#endif /* ANDROID */
+#endif /* ANDROID_KEYSTORE */
if (vpninfo->cert_type == CERT_TYPE_UNKNOWN) {
FILE *f = fopen(vpninfo->sslkey, "r");
#include <errno.h>
#include <stdlib.h>
#include <stdarg.h>
-#if defined(__linux__) || defined(ANDROID)
+#if defined(__linux__) || defined(__ANDROID__)
#include <sys/vfs.h>
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__) || defined(__APPLE__)
#include <sys/param.h>