AW: WG: [BusyBox] Bug-fix release

Pete Buechler peterb at suse.com
Sat Jul 8 00:05:45 UTC 2000


On Fri, 07 Jul 2000, Gerald Dachs wrote:

> dwarf:/usr/local/badger/source/busybox-0.45# make
> gcc -Wall -O2 -fomit-frame-pointer -fno-builtin -D_GNU_SOURCE -DBB_VER='"0.4
> 5"' -DBB_BT='"2000.07.07-21:25+0000"'   -c mount.c -o mount.o
> In file included from mount.c:59:
> /usr/include/linux/loop.h:62: #error "Wrong dev_t in loop.h"
> make: *** [mount.o] Error 1
> 
> piece of loop.h found in kernel 2.2.15 and 2.2.16:
> /*
>  * Note that this structure gets the wrong offsets when directly used
>  * from a glibc program, because glibc has a 32bit dev_t.
>  * Prevent people from shooting in their own foot.
>  */
> #if __GLIBC__ >= 2 && !defined(dev_t)
> #error "Wrong dev_t in loop.h"
> #endif

Well, I think the comment sort of explains it. dev_t is defined in the GNU C
library in /usr/include/sys/types.h as __dev_t, which in turn is defined in
/usr/include/bits/types.h as __u_quad_t. In my version of GLIBC, that makes it
an unsigned long long, which is 64 bits. 

Mean while, over in the kernel, /usr/src/linux-2.2.16.SuSE/include/linux/types
defines dev_t as __kernel_dev_t, which seems to come from
/usr/src/linux-2.2.16.SuSE/include/asm-i386/posix_types.h, where it is an
unsigned short. 

Now the comment below implies to me that they want to use the kernel
definition. But the fact that they print an error if dev_t is undefined makes
me think that perhaps they want the glibc version. Mmmm. Well, I'm sure they
want one or the other. Then the difference between the behavior folks see would
depend on minor differences in the order of includes in the include files which
cause one set of people to have it defined and another set to not have it
defined. I get sys/types.h through an include from stdlib.h.

Try sticking a direct include of sys/types.h into mount.c. Of course, that
assumes that they really want the glibc version ... 
-- 
Pete Buechler	: SuSE Linux Developer
Work e-mail	: peterb at suse.com
Work web page	: http://www.suse.com/~peterb
Personal e-mail	: peter.buechler at home.com





More information about the busybox mailing list