[PATCH 1/2] android/openconnect: add ability to build openconnect within android.

David Woodhouse dwmw2 at infradead.org
Thu Jul 14 23:03:01 EDT 2011


On Fri, 2011-07-15 at 01:38 +0000, openconnect at lakedaemon.net wrote:

> +common_CFLAGS += -DANDROID_CHANGES -DIFF_TUN

You shouldn't need to define IFF_TUN, surely?

How about -DIF_TUN_HDR="linux/if_tun.h" ?

> diff --git a/main.c b/main.c
> index 38c51bf..40c7184 100644
> --- a/main.c
> +++ b/main.c
> @@ -33,7 +33,9 @@
>  #include <fcntl.h>
>  #include <unistd.h>
>  #include <pwd.h>
> +#ifndef ANDROID_CHANGES
>  #include <sys/syslog.h>
> +#endif
>  #include <sys/utsname.h>
>  #include <sys/types.h>
>  #include <openssl/ui.h>

You remove the <sys/syslog.h> inclusion but *don't* remove the actual
calls to syslog() ? How does *that* work?

Hm, should I be including <syslog.h> instead of <sys/syslog.h> ?


> diff --git a/tun.c b/tun.c
> index 669b01f..280e66b 100644
> --- a/tun.c
> +++ b/tun.c
> @@ -38,6 +38,9 @@
>  #include <arpa/inet.h>
>  #include <errno.h>
>  #include <ctype.h>
> +#ifdef ANDROID_CHANGES
> +#include <linux/if_tun.h>
> +#endif
>  #if defined(__sun__)
>  #include <stropts.h>
>  #include <sys/sockio.h>

No, that's what the IF_TUN_HDR is for...

-- 
dwmw2




More information about the openconnect-devel mailing list