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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jul 14, 2011 at 08:03:01PM -0700, David Woodhouse wrote:
> 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" ?

Neat, didn't see that one, I'll use that instead.

> > 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?

By not calling openconnect with '--syslog' ;-)  My mistake.  It builds,
though.  I'll dig deeper.

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

Whichever you prefer.  Android build system/bionic is unique to say the
least.  I wouldn't make any special changes just for it.
 
> > 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...

Got it.

Thanks,

Jason.



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux