Bug 4838

Summary: miscutils/ubi_tools.c fails to compile against linux headers
Product: Busybox Reporter: Rob Walker <rwalker>
Component: OtherAssignee: unassigned
Status: RESOLVED FIXED    
Severity: normal CC: busybox-cvs
Priority: P5    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Host: Target:
Build:
Attachments: patch/workaround

Description Rob Walker 2012-03-02 23:44:15 UTC
Note really a BusyBox bug.

Linux headers on my Ubuntu box (11.10) use __packed, which isn't defined.

[rwalker@ruffian busybox]$ apt-cache show linux-libc-dev
Package: linux-libc-dev
Priority: optional
Section: devel
Installed-Size: 4584
Maintainer: Ubuntu Kernel Team <kernel-team@lists.ubuntu.com>
Architecture: amd64
Source: linux
Version: 3.0.0-12.20
...

BusyBox defconfig build fails with:

[rwalker@ruffian busybox]$ make
  CC      miscutils/ubi_tools.o
In file included from miscutils/ubi_tools.c:63:
/usr/include/mtd/ubi-user.h:329: error: conflicting types for ‘__packed’
/usr/include/mtd/ubi-user.h:313: note: previous declaration of ‘__packed’ was here
/usr/include/mtd/ubi-user.h:371: error: conflicting types for ‘__packed’
/usr/include/mtd/ubi-user.h:313: note: previous declaration of ‘__packed’ was here
/usr/include/mtd/ubi-user.h:386: error: conflicting types for ‘__packed’
/usr/include/mtd/ubi-user.h:313: note: previous declaration of ‘__packed’ was here
/usr/include/mtd/ubi-user.h:398: error: conflicting types for ‘__packed’
/usr/include/mtd/ubi-user.h:313: note: previous declaration of ‘__packed’ was here
/usr/include/mtd/ubi-user.h:412: error: conflicting types for ‘__packed’
/usr/include/mtd/ubi-user.h:313: note: previous declaration of ‘__packed’ was here
make[1]: *** [miscutils/ubi_tools.o] Error 1
make: *** [miscutils] Error 2
Comment 1 Rob Walker 2012-03-02 23:46:01 UTC
Created attachment 4070 [details]
patch/workaround