On 07/23/2011 07:55 PM, Rich Felker wrote:
> On Sat, Jul 23, 2011 at 05:50:53PM -0500, Rob Landley wrote:
>> On 07/23/2011 05:29 PM, Douglas Mencken wrote:
>>> Well, sed -i '/Include our own copy of struct
>>> sysinfo/{NNNNNNNNNNNNNNNNNN;d}' ./include/libbb.h **doesn't work** as
>>> expected (successful build): init/init.c:1010:18: error: storage size
>>> of 'info' isn't known. So it is really important to keep libbb's
>>> definition, and not using the kernel's one.
>>>
>>> I suppose the solution would be to rename 'sysinfo' to 'bb_sysinfo' or
>>> such; but this can cause link errors.
>>
>> man 2 sysinfo:
>>
>> SYNOPSIS
>>        #include <sys/sysinfo.h>
>>
>>        int sysinfo(struct sysinfo *info);
>>
>> CONFORMING TO
>>        This function is Linux-specific, and should not  be  used  in
>>        programs intended to be portable.
>>
>> Looks like #include <sys/sysinfo.h> needs to go in libbb.h, and any
>> environment that we can't build against using that is probably broken.
> 
> Indeed, this is the correct fix. But why does libbb.h need sysinfo
> anyway? This interface should be useful to at most 1-2 applets, which
> could just include the file themselves, and then its absence would not
> break anything as long as those (linux-specific) applets are disabled.

Works for me.

I note that I worked around this by just disabling the two applets that
broke, TCPSVD and UDPSVC, both of which are the strange "service daemon"
thing Denys is so fond of.

In this case, those applets redundantly implement netcat server mode,
for no apparent reason.  I don't know why they exist in the first place.

Rob
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to