[BusyBox] linux 2.6 and busybox 1.00-pre10
Rob Landley
rob at landley.net
Mon Jun 14 04:36:32 MDT 2004
On Sunday 13 June 2004 12:08, Simon Keimer wrote:
> hi there,
>
> I try to compile busybox 1.00-pre10 on an linux 2.6.6 system. I get the
> following error message:
>
> gcc -I./include -Wall -Wstrict-prototypes -Wshadow -Os -march=i386
> -mpreferred-stack-boundary=2 -falign-functions=0 -falign-jumps=0
> -falign-loops=0 -fomit-frame-pointer -D_GNU_SOURCE -DNDEBUG -Os -c -o
> libbb/loop.o libbb/loop.c
> libbb/loop.c:51: error: parse error before "__kernel_old_dev_t"
> libbb/loop.c:51: warning: no semicolon at end of struct or union
> libbb/loop.c:53: error: parse error before "lo_rdevice"
> libbb/loop.c:53: warning: type defaults to `int' in declaration of
> `lo_rdevice'
> libbb/loop.c:53: warning: data definition has no type or storage class
> libbb/loop.c:62: error: parse error before '}' token
> libbb/loop.c: In function `set_loop':
> libbb/loop.c:84: error: storage size of `loopinfo' isn't known
> libbb/loop.c:84: warning: unused variable `loopinfo'
> libbb/loop.c: In function `find_unused_loop_device':
> libbb/loop.c:129: error: storage size of `loopinfo' isn't known
> libbb/loop.c:129: warning: unused variable `loopinfo'
> make: *** [libbb/loop.o] Error 1
Ooh, I bumped into this a while back for the distro I'm putting together
(busybox+uclibc+mazur's 2.6 headers). Did I remember to send the patch in to
the list? I guess not...
--- /home/landley/pending/cvs/busybox/libbb/loop.c 2004-03-15
02:28:42.000000000 -0600
+++ busybox/libbb/loop.c 2004-05-21 16:36:46.000000000 -0500
@@ -27,17 +27,8 @@
#include <sys/ioctl.h>
#include "libbb.h"
-/* Grumble... The 2.6.x kernel breaks asm/posix_types.h
- * so we get to try and cope as best we can... */
#include <linux/version.h>
#include <asm/posix_types.h>
-#if LINUX_VERSION_CODE >= 132608
-#define __bb_kernel_dev_t __kernel_old_dev_t
-#elif LINUX_VERSION_CODE >= 0x20600
-#define __bb_kernel_dev_t __kernel_dev_t
-#else
-#define __bb_kernel_dev_t unsigned short
-#endif
/* Stuff stolen from linux/loop.h */
#define LO_NAME_SIZE 64
@@ -48,9 +39,9 @@
#define LOOP_GET_STATUS 0x4C03
struct loop_info {
int lo_number;
- __bb_kernel_dev_t lo_device;
+ __kernel_dev_t lo_device;
unsigned long lo_inode;
- __bb_kernel_dev_t lo_rdevice;
+ __kernel_dev_t lo_rdevice;
int lo_offset;
int lo_encrypt_type;
int lo_encrypt_key_size;
More information about the busybox
mailing list