[Toybox] Android support

enh enh at google.com
Thu Nov 20 22:42:32 PST 2014


On Thu, Nov 20, 2014 at 9:24 PM, Rob Landley <rob at landley.net> wrote:
> On 11/20/14 12:33, enh wrote:
>> i notice you just added sethostname to portability.c which causes this
>> warning on Android:
>>
>> external/toybox/lib/portability.c:70:3: warning: implicit declaration
>> of function 'syscall' [-Wimplicit-function-declaration]
>>    return syscall(__NR_sethostname, name, len);
>>
>> the correct #include would have been #include <sys/syscall.h>, not
>> <asm/unistd.h>. you really shouldn't ever #include an asm/ file.
>
> Agreed.
>
> I merged the contribution mostly as-is because I don't have an android
> build environment set up. (I need to reinstall a system to get an
> environment to set up AOSP in, and the release deadline was 4 days
> overdue...)
>
>> i'm also curious about what your target is. AOSP master has
>> sethostname, so you don't need any of this. (but you do need some
>> other changes.)
>
> My target is making these guys happy:
>
> https://code.google.com/p/android/issues/detail?id=76861
>
> That said, I see they posted their own diff to that thread since the
> last time I looked at it, so I'll see about merging that instead.

ah. that makes things easy then --- i'm the google guy on that bug :-)

i'm happy just building toybox as part of the platform, and there --
to repeat what i said on the bug for the new audience on this list --
the only things we're missing right now are <pty.h>, <shadow.h>, and
<utmpx.h>.

here's the patch i committed this morning:
https://android-review.googlesource.com/#/c/115676/1/lib/portability.h

for a real patch you'd probably want to stop building the getdelim and
getline implementations too. i can send one to the list if that'd
help.

>> anyway, let me know what you're trying to do and i'll try to help.
>>
>>  --elliott (bionic maintainer)
>
> Isaac Dunham did the patch I merged. I have some local logistical issues
> freeing up a machine with enough resources to build AOSP, they're all
> doing things I need them to do yet bad for AOSP in one way or another, I
> need to devote a weekend to reinstalling one...
>
> I'll try to get the better android patch applied this weekend. (The
> annotation of individual commands that won't work without utmpx and such
> in the old patch is good, so I should merge the two...)

yes, the annotations are a nice solution. i wish i'd had that a week ago :-)

i do plan on implementing <pty.h>, hopefully before the next release,
but i didn't want to hold up getting started on using toybox until
that's done.

> Thank you,
>
> Rob

 1416552152.0


More information about the Toybox mailing list