[Toybox] Compile errors when compiling for ARM

Rob Landley rob at landley.net
Wed Nov 28 21:28:22 PST 2012


On 11/28/2012 10:59:38 PM, Ashwini Sharma wrote:
> Hi Rob,
> 
>  I am getting few other warnings related to "portability.h".
> When compiling for ARM target it throws
> warning: implicit declaration of function 'getsid'
> warning: implicit declaration of function 'getpgid'

I'm not finding either of those in the current toybox code?

I also compiled using the armv5l toolchain at:
   http://landley.net/aboriginal/bin/cross-compiler-armv5l.tar.bz2

And it complained that gethostbyname in netcat is obsolescent (which is  
a uClibc glitch about ipv6 support I think) but otherwise had no  
warnings?

I built with the musl wrapper, and didn't see those warnings either.  
(I'm working through several other bugs it found... possibly in musl  
for some of them.)

> adding the header "unistd.h" and function prototype in potability.h  
> for #if
> defined(__GLIBC__)
> section solves it for me.

We already #include unistd.h in toys.h, but portability.h is #included  
before that (so it can do feature test macros if absolutely necessary,  
although I try to avoid that).

> Is this the right way of doing it?

It's a reasonable workaround, but I'm not reproducing this problem so I  
can't say what's actually going on.

Is there somewhere I can get a toolchain that reproduces this? (Is it  
from Code Sourcery perhaps?)

Rob
 1354166902.0


More information about the Toybox mailing list