[PATCH 2/2] Added support for compiling against Android bionic

Tito farmatito at tiscali.it
Wed Jun 1 11:54:14 UTC 2011



On Wednesday 01 June 2011 10:28:26 Dan Fandrich wrote:
> On Tue, May 31, 2011 at 08:42:50AM -0400, Rich Felker wrote:
> > On Mon, May 30, 2011 at 11:14:35PM -0700, Dan Fandrich wrote:
> > Sadly it looks like ttyname might also be missing. It's easily
> > implemented via readlink on /proc/self/fd/%d though, or some ioctl or
> > fstat to get the device/tty number.
> 
> If it's just a stub, and newer versions of Android also provide a
> ttyname_r stub, then I'll just drop that part of the patch.
> 
> > > Is PAGE_SIZE mandated somewhere to be defined in limits.h? I tried
> > > glibc, uclibc, libc5 and OpenWatcom (all on Linux) and none of them
> > > defines it in limits.h.
> > 
> > If it's a constant, it's supposed to be defined there. If not, it
> > should not be defined anywhere. Unfortunately some bloatware fans are
> > into this whole "large pages" movement and want it considered
> > variable...
> 
> It does look like Walter Harms' suggestion of using sysconf() is the most
> portable way of getting this value. The attached patch makes that change.

Why don't you just include #include <asm/page.h>
as android's sysconf.c does?
Tito

> 
> > > The conditional in networking/interface.c isn't as obvious. I tried removing
> > > the UCLIBC clause altogether and it still compiled fine in uClibc 0.6.29,
> > > so perhaps it dates from an earlier version and could just be removed now.
> > 
> > I suspect so. That would be nice...
> 
> I'll remove that as well and see if anyone complains. There are a number
> of other files that conditionally include net/ethernet.h (and usually
> netpacket/packet.h) only on newer glibc versions, so I'll switch
> those to using a macro in platform.h as well.  I'll test that a bit more
> and send an updated Android patch later.
> 
> >>> Dan
> 



More information about the busybox mailing list