Commit 391ea5d0 authored by David Woodhouse's avatar David Woodhouse

Check for __ANDROID__ not ANDROID

The latter doesn't appear to be set by the NDK.
Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
parent 5533e48a
......@@ -247,7 +247,7 @@ OPENCONNECT_BUILD := $(TRIPLET)/openconnect
$(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
......
......@@ -29,7 +29,7 @@
#endif
#include <stdio.h>
#ifdef ANDROID
#ifdef __ANDROID__
#include <android/log.h>
#else
#include <syslog.h>
......@@ -756,7 +756,7 @@ int main(int argc, char **argv)
exit(1);
if (use_syslog) {
#ifndef ANDROID
#ifndef __ANDROID__
openlog("openconnect", LOG_PID, LOG_DAEMON);
#endif
vpninfo->progress = syslog_progress;
......@@ -937,7 +937,7 @@ void write_progress(void *_vpninfo, int level, const char *fmt, ...)
}
}
#ifdef ANDROID
#ifdef __ANDROID__
void syslog_progress(void *_vpninfo, int level, const char *fmt, ...)
{
static int l[4] = {
......@@ -959,7 +959,7 @@ void syslog_progress(void *_vpninfo, int level, const char *fmt, ...)
va_end(args2);
}
}
#else /* !ANDROID */
#else /* !__ANDROID__ */
void syslog_progress(void *_vpninfo, int level, const char *fmt, ...)
{
int priority = level ? LOG_INFO : LOG_NOTICE;
......
......@@ -385,7 +385,7 @@ int __attribute__ ((format (printf, 2, 3)))
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
......
......@@ -762,7 +762,7 @@ static int load_certificate(struct openconnect_info *vpninfo)
}
return 0;
}
#endif /* ANDROID */
#endif /* ANDROID_KEYSTORE */
if (vpninfo->cert_type == CERT_TYPE_UNKNOWN) {
FILE *f = fopen(vpninfo->sslkey, "r");
......
......@@ -35,7 +35,7 @@
#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>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment