Doesn't build under Linux 3.0?

Rob Landley rob at landley.net
Sat Jul 23 22:50:53 UTC 2011


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.

Rob



More information about the busybox mailing list