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.

Rich
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to