Bug 4838 - miscutils/ubi_tools.c fails to compile against linux headers
Summary: miscutils/ubi_tools.c fails to compile against linux headers
Status: RESOLVED FIXED
Alias: None
Product: Busybox
Classification: Unclassified
Component: Other (show other bugs)
Version: unspecified
Hardware: PC Linux
: P5 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-02 23:44 UTC by Rob Walker
Modified: 2012-03-11 17:05 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments
patch/workaround (666 bytes, patch)
2012-03-02 23:46 UTC, Rob Walker
Details

Note You need to log in before you can comment on or make changes to this bug.
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